Call a macro from a combobox - how ??

G

gravesen

HI I have a combobox created in forms.
I would like have a label and a tekst that I can insert in the documen
but also I would like very much to run a macro that is in my newmacros
Can anyone tell me how this is done. I have tryed something like this
I don't get an error but the macro is not run.
I am trying to run the macro testet.

Private Sub UserForm_Initialize()
With cboProgram
.AddItem "This is the label"
Application.Run MacroName:="testet"

.AddItem "Sales Partner"
cboProgram.ControlTipText = "Test3"
.AddItem "Support Center"
cboProgram.ControlTipText = "Test4"
.AddItem "Another Company"
End With
End Sub





Thanks
Lars Gravese
 

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

Top