Dropdown Menu Hyperlink

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi..
I want to create Hyperlink for list comming in dropdown menu. Lets assume
that there are 5 names in cell A1 to A5 and also their are 5 Sheets in the
files having those names. I create a dropdown menu and select the list of
name. Now if I choose The name comming in cell A2 than i should be able to
jump to a sheet2 and if i choose A that to Sheet 5. how do i do that?
 
Thanks , you are great.

Mike said:
Anand

Put a combobox from the tools control box on you worksheet
Atarting in the top row of any column type sheet1 ,sheet1 etc until you have
the names of you 5 sheets you want to select. Important you start in the top
row of a column

Right click the combo box and in the listfill box type A1:A5 or wherever you
have put your list. Note you must be in design mode to do this.

Still in design mode right click again and assign the macro below

Private Sub ComboBox1_Change()
Dim sheet As Integer

sheet = ComboBox1.Value
Select Case sheet
Case 1
Worksheets("sheet1").Select
Case 2
Worksheets("sheet2").Select
Case 3
Worksheets("sheet3").Select
Case 4
Worksheets("sheet4").Select
Case 5
Worksheets("sheet5").Select

End Select

End Sub

Exit design mose and your done

Mike
 
Mike or anyone,

Would you mind explaining something to me.

I think "sheet1" and "integer" together caused run-time error 13 (type mismatch). Should I change "integer" to say "string?" I am new to VBA. Appreciate help.

Epinn

Anand

Put a combobox from the tools control box on you worksheet
Atarting in the top row of any column type sheet1 ,sheet1 etc until you have
the names of you 5 sheets you want to select. Important you start in the top
row of a column

Right click the combo box and in the listfill box type A1:A5 or wherever you
have put your list. Note you must be in design mode to do this.

Still in design mode right click again and assign the macro below

Private Sub ComboBox1_Change()
Dim sheet As Integer

sheet = ComboBox1.Value
Select Case sheet
Case 1
Worksheets("sheet1").Select
Case 2
Worksheets("sheet2").Select
Case 3
Worksheets("sheet3").Select
Case 4
Worksheets("sheet4").Select
Case 5
Worksheets("sheet5").Select

End Select

End Sub

Exit design mose and your done

Mike
 
Back
Top