User Form Question

  • Thread starter Thread starter alexdetrano
  • Start date Start date
A

alexdetrano

Hi there

I need to implement a user form that let's the user pick one of five
cases (basic, increased, decreased, superior, inferior) and when each
is picked, it runs a macro that changes specific cells. I have all
the macros recorded and saved, I am just clueless as to how to get the
list inside of the combo box and then have the macros executed. Any
help would be greatly appreciated!

Thank you
 
Hi Alex,

Try something like:

'=============>>
Private Sub ComboBox1_Change()
Select Case Me.ComboBox1.Value
Case "basic": Call Macro1
Case "increased": Call Macro2
Case "decreased": Call Macro3
Case "superior": Call Macro4
Case "inferior": Call Macro5
End Select
End Sub

'------------------>>
Private Sub UserForm_Initialize()
With Me.ComboBox1
.AddItem "basic"
.AddItem "increased"
.AddItem "decreased"
.AddItem "superior"
.AddItem "inferior"
End With
End Sub
'<<=============
 

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