MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Simple combo box problem

Posted by Gehan on June 30, 2001 3:13 AM

Hi there
I have a combo box with 4 options, each option should take me to a certain page.

Option 1 - Sheet 1
option 2 - Sheet 2. etc...

I tried assigning macro but I can only assign one macro to the combo box, so all the options take me to the same page.

Or I use IF THEN ELSE is it possible to call a macro or jump to another page.

Please help....


Posted by Cory on June 30, 2001 7:54 AM

Simple combo box solution

If your combobox is on a form then add this code where "sheet1" is your first sheet, so on and so forth:

Private Sub ComboBox1_Change()
If ComboBox1.Value = "sheet1" Then
ElseIf ComboBox1.Value = "sheet2" Then
ElseIf ComboBox1.Value = "sheet3" Then
End If
End Sub


Posted by Gehan on June 30, 2001 11:52 AM

Re: Simple combo box solution

Hi there
this didnt work, it gave me a runtime error 424. Is it possible to do it using if then else like if(a32=1,sheet1.Activate)...

Please help me