Goto a control element

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to include a line in my VBA macro that will select a combo box, but I
don't know how to address it to put it into focus.

Can I name it? Or is there another way to handle it. An example would be
very much appreciated.
 
Where is the combobox located. Worksheet, userform, dialogsheet

control toolbox toolbar combobox or one from the forms toolbar. If from the
data validation option, then just select the cell.
 
The combo box is located on a worksheet - and is an element selected from the
toolbar.
 
Activesheet.Combobox1.Activate

or

activesheet.OleObjects("Combobox1").Activate
 
Appreciate this help, Tom. Thank you.

Can you tell me how to identify the object names (like Combobox1)
 
Try selecting it (in design mode--another icon on that control toolbox toolbar).

Then look at the namebox (to the left of the formulabar).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top