Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Value of ComboBox on Custom CommandBar

I've created a custom commandbar that has a combobox and
a button. I want to be able to choose a value from the
combobox, click the button, and have that run a macro
based on the value that is in the ComboBox. Does anyone
know how to return this value?

Thanks for your help!
Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Value of ComboBox on Custom CommandBar

Application.CommandBars.FindControl(Tag:="cbo_tag" ).Text

if the tag property was used.

"Kevin" wrote in message
...
I've created a custom commandbar that has a combobox and
a button. I want to be able to choose a value from the
combobox, click the button, and have that run a macro
based on the value that is in the ComboBox. Does anyone
know how to return this value?

Thanks for your help!
Kevin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Value of ComboBox on Custom CommandBar

Tim,

Thanks for the help. I've never used the tag property
before, but I'll look into that and try to make this work.

Thanks again,
Kevin

-----Original Message-----
Application.CommandBars.FindControl(Tag:="cbo_tag ").Text

if the tag property was used.

"Kevin" wrote in

message
...
I've created a custom commandbar that has a combobox

and
a button. I want to be able to choose a value from the
combobox, click the button, and have that run a macro
based on the value that is in the ComboBox. Does

anyone
know how to return this value?

Thanks for your help!
Kevin



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Value of ComboBox on Custom CommandBar

So when you create the combobox:

With .Controls.Add(Type:=msoControlComboBox, Temporary:=True)
.AddItem "something"
.AddItem "something else"
.OnAction = "MyMacro"
.Tag = "cbo_tag"
End With


"Kevin" wrote in message
...
Tim,

Thanks for the help. I've never used the tag property
before, but I'll look into that and try to make this work.

Thanks again,
Kevin

-----Original Message-----
Application.CommandBars.FindControl(Tag:="cbo_tag ").Text

if the tag property was used.

"Kevin" wrote in

message
...
I've created a custom commandbar that has a combobox

and
a button. I want to be able to choose a value from the
combobox, click the button, and have that run a macro
based on the value that is in the ComboBox. Does

anyone
know how to return this value?

Thanks for your help!
Kevin



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Value of ComboBox on Custom CommandBar

Tim,

This works exactly how I want it to- thank you for your
help and follow through!

Take care,
Kevin

-----Original Message-----
So when you create the combobox:

With .Controls.Add(Type:=msoControlComboBox,

Temporary:=True)
.AddItem "something"
.AddItem "something else"
.OnAction = "MyMacro"
.Tag = "cbo_tag"
End With


"Kevin" wrote in

message
...
Tim,

Thanks for the help. I've never used the tag property
before, but I'll look into that and try to make this

work.

Thanks again,
Kevin

-----Original Message-----
Application.CommandBars.FindControl

(Tag:="cbo_tag").Text

if the tag property was used.

"Kevin" wrote in

message
...
I've created a custom commandbar that has a combobox

and
a button. I want to be able to choose a value from

the
combobox, click the button, and have that run a

macro
based on the value that is in the ComboBox. Does

anyone
know how to return this value?

Thanks for your help!
Kevin


.



.

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
How to exchange Custom Commandbar buttons between PC's? Frank Van Eygen[_2_] Excel Discussion (Misc queries) 3 April 10th 09 01:01 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
Moving CommandBar using VBA or C# Aaron Queenan Excel Programming 1 October 31st 03 03:20 PM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


All times are GMT +1. The time now is 11:07 AM.

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"