ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Dropdown Menu Hyperlink (https://www.excelbanter.com/new-users-excel/124443-dropdown-menu-hyperlink.html)

Anand vijay

Dropdown Menu Hyperlink
 
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?

Mike

Dropdown Menu Hyperlink
 
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

"Anand vijay" wrote:

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?


Anand vijay

Dropdown Menu Hyperlink
 
Thanks , you are great.

"Mike" wrote:

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

"Anand vijay" wrote:

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?


Epinn

Dropdown Menu Hyperlink
 
Mike or anyone,

Would you mind explaining something to me.

......type sheet1 ...... until you have the names of your 5 sheets you want to select ....... <<


Dim sheet As Integer <<


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

"Mike" wrote in message ...
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

"Anand vijay" wrote:

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?




All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com