Unhide a Sheet Based on a Cell Dropdown

tomexcel1

New Member
Joined
Feb 22, 2018
Messages
47
Hi All

I have a 13 hidden sheets in my workbook, Based on the users input the correct sheet to unhide shows in sheet6 cell E10 ie (Upload A or Upload B etc).

My question is using VBA how can I make clicking a button unhide the correct sheet?

Any help is much appreciated! Thanks

Tom
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
How about
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Address(0, 0) = "E10" And Target.Value <> "" Then
      If Evaluate("isref('" & Target.Value & "'!A1)") Then
         Sheets(Target.Value).Visible = True
      Else
         MsgBox "Sheet " & Target.Value & " doesn't exists"
      End If
   End If
End Sub
This needs to go in the sheet module for sheet6
 
Upvote 0
Try
Code:
Sub tomexcel1()
   With Sheets("Sheet6").Range("E10")
      If .Value <> "" Then
         If Evaluate("isref('" & .Value & "'!A1)") Then
            Sheets(.Value).Visible = True
         Else
            MsgBox "Sheet " & .Value & " doesn't exists"
         End If
      End If
   End With
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top