Value of ComboBox on Custom CommandBar

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

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
 
Application.CommandBars.FindControl(Tag:="cbo_tag").Text

if the tag property was used.
 
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
 
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
 
Tim,

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

Take care,
Kevin
 

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