Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that unhides a sheet and takes the user to that sheet
Hello,
I have a macro on sheet 'inputs' that unhides another sheet called 'calculations' and takes the user there from when they click on the button. The codes is as follows: Sub Reveal() With ThisWorkbook If Worksheets("Calculations").Visible = False Then Worksheets("Calculations").Visible = True Worksheets("Calculations").Activate End If End With End Sub This works well but I would now like to add a feature. I would like the same button to take the user from the 'inputs' sheet to the 'calculations' sheet even if the sheet is already revealed. How could I do this? Thanks very much in advance! -- Johanna |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that unhides a sheet and takes the user to that sheet
Try
Sub Reveal() With Worksheets("Calculations") If .Visible = False Then .Visible = True .Activate End With End Sub -- Jacob "Johanna Gronlund" wrote: Hello, I have a macro on sheet 'inputs' that unhides another sheet called 'calculations' and takes the user there from when they click on the button. The codes is as follows: Sub Reveal() With ThisWorkbook If Worksheets("Calculations").Visible = False Then Worksheets("Calculations").Visible = True Worksheets("Calculations").Activate End If End With End Sub This works well but I would now like to add a feature. I would like the same button to take the user from the 'inputs' sheet to the 'calculations' sheet even if the sheet is already revealed. How could I do this? Thanks very much in advance! -- Johanna |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that unhides a sheet and takes the user to that sheet
That was very helpful and quick again Jacob. Thank you so much for your
continuing support. -- Johanna "Jacob Skaria" wrote: Try Sub Reveal() With Worksheets("Calculations") If .Visible = False Then .Visible = True .Activate End With End Sub -- Jacob "Johanna Gronlund" wrote: Hello, I have a macro on sheet 'inputs' that unhides another sheet called 'calculations' and takes the user there from when they click on the button. The codes is as follows: Sub Reveal() With ThisWorkbook If Worksheets("Calculations").Visible = False Then Worksheets("Calculations").Visible = True Worksheets("Calculations").Activate End If End With End Sub This works well but I would now like to add a feature. I would like the same button to take the user from the 'inputs' sheet to the 'calculations' sheet even if the sheet is already revealed. How could I do this? Thanks very much in advance! -- Johanna |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run macro when user selects a different sheet | Excel Programming | |||
Macro that unhides sheet tabs | Excel Discussion (Misc queries) | |||
macro that takes data entered in a user form textbox to go to a ra | Excel Programming | |||
TAB key takes cursor to other end of sheet... | Excel Discussion (Misc queries) | |||
Help with Macro. -- User input for sheet name | Excel Programming |