Brampton76
New Member
- Joined
- Nov 14, 2008
- Messages
- 35
Greetings,
I have used the following coding in the past to select from 1 of 12 sheets where the sheet has been hidden using one of 12 buttons:
Sub JanuarySheetOpen()
Sheets("January").Visible = True
Sheets("January").Select
Range("A2").Select
End Sub
I now have another workbook where I would like to select from 1 of 89 sheets where the sheets have been hidden (and would like to avoid having 89 separate buttons!). I thought I could use a Data Validation list and refer to the cell as follows:
Sub SheetOpen()
Sheets("Dashboard!H14").Visible = True
Sheets("Dashboard!H14").Select
Range("A2").Select
End Sub
but it would appear not to be the case. I keep running into a 'Runtime Error 9 - Subscript Out of Range' I wonder if someone could point me in the right direction? Also, this may not be the best way to achieve this? Many thanks
Glenn
I have used the following coding in the past to select from 1 of 12 sheets where the sheet has been hidden using one of 12 buttons:
Sub JanuarySheetOpen()
Sheets("January").Visible = True
Sheets("January").Select
Range("A2").Select
End Sub
I now have another workbook where I would like to select from 1 of 89 sheets where the sheets have been hidden (and would like to avoid having 89 separate buttons!). I thought I could use a Data Validation list and refer to the cell as follows:
Sub SheetOpen()
Sheets("Dashboard!H14").Visible = True
Sheets("Dashboard!H14").Select
Range("A2").Select
End Sub
but it would appear not to be the case. I keep running into a 'Runtime Error 9 - Subscript Out of Range' I wonder if someone could point me in the right direction? Also, this may not be the best way to achieve this? Many thanks
Glenn