Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox Population: Excel

Status
Not open for further replies.

Funkymatt

Programmer
Joined
Aug 27, 2002
Messages
101
Location
US
I'm running into errors with the following EXCEL worksheet.

Sheet1.cboCollatType.Add ("PC")
Sheet1.cboCollatType.Add ("REMIC")
Sheet1.cboCollatType.Add ("BALLOON")

I also tried the AddItem method.
 
Isn't the method to add a combo box item ".AddItem", not ".Add" ?
 
I tired the dot AddItem as well. I think that my problem is I need to populate the "Sheet1" ComboBox1 when the XLS is opened for the first time. I think that my Sheet1 object isn't valid and that is the reason the AddItem method isn't working.

Private Sub Workbook_Open()

Worksheets("sheet1").Activate
??Worksheets("sheet1").cboCollatType.AddItem ("PC")
Sheet1.cboCollatType.AddItem ("REMIC")
Sheet1.cboCollatType.AddItem ("BALLOON")

End Sub

Yikes....I have no idea what I'm doing. OR...can I pre-populate these items using the properties at design time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top