Hey, guys.
What's up?
I've been searching for a way to create a dropdown combobox with VBA, exaclty the way I want it, but I haven't found anything similar to what I want.
I need to do this...
1) Unhide column A (if it is hidden, of course).
I know how to do this.
2) Create a combobox (dropdown list) and name it "cbbActionCombo".
I have no idea on how to do this, although I've searched a little about it. I know there are two kinds of comboboxes (UserForm and ActiveX), but I do not know which is better/suitable to my needs. This combobox must be customizable, I mean, I want it to have transparent background and no borders; and, mainly, I need to change its font style. That's the reason I quit on using data validation dropdown list. It's not customizable.
3) Once I have a combobox created and named, I need to put it exactly "inside", so to speak, cell A10.
I know how to do this. Well, sort of...
4) Next step is to populate the combobox with a named range (dynamic range) called "rngActionComboList". By the way, this named range already exists; there's no need to create it. Just one detail... This named range may vary depending on which button I'll click, on the sheet, but that's OK. If I learn how to populate the combobox with one named range, I can deal with the other ones, no problem.
I don't know how to do that.
5) With the combobox created, named, sized, positioned and populated, I want it to receive focus and drop down, showing the list with the first item highlighted.
I don't know how to do that.
Well, that's it. From that point on, I know what to do when something is selected and bla bla bla.
After some item is selected from the list, a macro will be run. One of the first things this macro will do is...
6) Delete that combobox and hide column A. If deleting is just a matter of "cbbActionCombo.Delete", I'm cool with that. If not, please, guide me.
That's it, folks. I'm pretty sure the coding for all this stuff must be relatively simple; but for me, a newbie, it is not. I hope you can help me.
Just for the record, I know how to do everything I mentioned above... with the power of my MOUSE. lol Problem is, when it comes to VBA...Oh, I suffer! lol I tried to record macros while doing all that stuff, but some things just won't get recorded; I don't know why. So, I got stuck.
Thanks in advance for your time, guys.
brunces
Bookmarks