Hello All,
I've searched the internet all day for a solution to this but I cannot find an answer. If anyone knows the proper syntax to do this I would be greatfull. In any case this is what I am trying to do conceptually. Keep in mind I am not using a form control but an ActiveX combo box control in excel 2007.
I want to code some vba for excel. Specifically I have several combo boxes in a spreadsheet that I want to populate with the same items lets say:
Item1
Item2
Item3
I want this to populate when the workbook opens. So far no problem. I attach the following in the Workbook_Activate routine and it works fine:
But this doesn’t work. The ComboBox(XLoopVar) portion is obviously wrong. But I can’t seem to find the correct syntax to do this anywhere. I find some VB examples but they don’t seem to work with the VBA in Excel and the forms examples don't seem to have the coresponding additem method with the activex control. Has anyone attempted this before and know of a way to do this?
Thanks,
Eric
Bookmarks