-
populate combobox when workbook is open
Hey I am just wonderign how to populate a activex combobox when the workbook is open.
I have tried clicking design and then clicking on the combobox and then view code (because it seems that this code is stored in a different place than a macro code is, because under view macros there is no code there)
and then my code is
[VBA]Sub workbook_open()
ComboBox1.AddItem "Yes"
End Sub[/VBA]
but it does not populate the combobox when its open. I have also tried creating a macro and putting
[VBA]Sub workbook_open()
ComboBox1.AddItem "Yes"
End Sub
[/VBA]
in but it still does not populate. It will if under the code i hit run then it populates.
So i am just wonderign why this code is not wanting to run when the workbook is open.
Thansk
-
nevermind I didnt not have the code in This Workbook, it was in the sheet1 workbook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules