Dropdown Menu Hyperlink

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?
 
G

Guest

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
 
E

Epinn

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
 

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

Similar Threads

Help With MS Access 4
excel dropdown menu question 2
Hyperlink Picklist 5
conditional dropdown 6
Creating dropdown menu 1
hyperlink from dropdown list 6
Link Dropdown menu to an image 0
Windows XP Prohibit record run history 0

Top