![]() |
Goto a control element
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. |
Goto a control element
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. -- Regards, Tom Ogilvy "dsimcox" wrote in message ... 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. |
Goto a control element
The combo box is located on a worksheet - and is an element selected from the
toolbar. "Tom Ogilvy" wrote: 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. -- Regards, Tom Ogilvy "dsimcox" wrote in message ... 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. |
Goto a control element
Activesheet.Combobox1.Activate
or activesheet.OleObjects("Combobox1").Activate -- Regards, Tom Ogilvy "dsimcox" wrote in message ... The combo box is located on a worksheet - and is an element selected from the toolbar. "Tom Ogilvy" wrote: 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. -- Regards, Tom Ogilvy "dsimcox" wrote in message ... 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. |
Goto a control element
Appreciate this help, Tom. Thank you.
Can you tell me how to identify the object names (like Combobox1) "Tom Ogilvy" wrote: Activesheet.Combobox1.Activate or activesheet.OleObjects("Combobox1").Activate -- Regards, Tom Ogilvy "dsimcox" wrote in message ... The combo box is located on a worksheet - and is an element selected from the toolbar. "Tom Ogilvy" wrote: 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. -- Regards, Tom Ogilvy "dsimcox" wrote in message ... 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. |
Goto a control element
Try selecting it (in design mode--another icon on that control toolbox toolbar).
Then look at the namebox (to the left of the formulabar). dsimcox wrote: Appreciate this help, Tom. Thank you. Can you tell me how to identify the object names (like Combobox1) "Tom Ogilvy" wrote: Activesheet.Combobox1.Activate or activesheet.OleObjects("Combobox1").Activate -- Regards, Tom Ogilvy "dsimcox" wrote in message ... The combo box is located on a worksheet - and is an element selected from the toolbar. "Tom Ogilvy" wrote: 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. -- Regards, Tom Ogilvy "dsimcox" wrote in message ... 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. -- Dave Peterson |
All times are GMT +1. The time now is 08:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com