Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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.










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Percentage of an Element ... Magic1 New Users to Excel 1 May 24th 09 05:56 PM
How to define the 1st, 2nd and 3rd element DamiaoPastana Excel Worksheet Functions 4 June 8th 06 06:55 PM
On Error Goto doesn't goto Paul Excel Programming 1 October 15th 04 03:51 PM
On Error Goto doesn't goto Paul Excel Programming 0 October 15th 04 03:05 PM
control element polletje[_3_] Excel Programming 1 January 4th 04 03:02 PM


All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"