Samadhan Gaikwad
Member
Hi,
I have posted below code under Thisworkbook, but getting run time error 424: object required. I have added combo boxes in sheet.
I have posted below code under Thisworkbook, but getting run time error 424: object required. I have added combo boxes in sheet.
Code:
Private Sub Workbook_Open()
Application.EnableEvents = False
'Clear ComboBox1 Items
Call Clear_ComboBox
'Add Items to ComboBox1 in Sheet1 while opening workbook
With PR_data_with_search.ComboBox1
.AddItem "Fruits"
.AddItem "Vegetables"
.AddItem "Soaps"
.AddItem "Beverages"
End With
Application.EnableEvents = True
End Sub
Sub Clear_ComboBox()
'Clear ComboBox & TextBox data
With PR_data_with_search
.ComboBox1.Clear
.ComboBox2.Clear
' .TextBox1.Text = ""
' .TextBox2.Text = ""
End With
End Sub