I can not figure out how to properly work with a combobox in VBA. First of all I had tried using the activeX form control but it ended up not working properly (resizing by itself or disappearing all together) Which seems to be a common problem or bug in excel. Something to do with viewing at different resolutions or something like that.
Anyway so here I am. I'm trying to use the form control combo box. How do I change the name from Combo Box 1 to something more appropriate? How do I fill the combo box through VBA? On opening the workbook? How to properly use the combo box? I've been trying different things for a few hours now and I just can't get it to work. I'm about the thrown the towel
Edit: Just a note but you probably wont find any article on this site about form controls that I haven't tried yet.. Also I will add some code in the meanwhile that I have already tried but I posted this already so you can have a though.
Private Sub Workbook_Open()
Sheet10.DropDowns.Add(280, 70, 200, 20)
end sub
The above adds a combo box to my sheet10. What now? How do I fill it? How do I name it? I don't have a clue
Private Sub Workbook_Open()
Sheet10.DropDowns.Add(280, 70, 200, 20).Name = cmbTest
cmbTest.AddItem "test"
'Tried many different things here to add an item, this is just 1 of the many ways I found on the internet. Don't work.
end sub
Above names that dropdown but I can't use the name to code anything..