Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've programmed a button to open/go to a hidden worksheet. On the hidden
worksheet, I've coded a button to hide it again. But how do I get the button to take me back to the original worksheet (rather than going to the one next to the hidden sheet)? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, let me clarify that the "open/go to hidden worksheet" button is on
a number of different worksheets, so simply coding the button to go back to a specific worksheet will not do. It needs to remain generic and go back to the worksheet that opened it in the first place. I hope this makes sense . . .. "meb081505" wrote: I've programmed a button to open/go to a hidden worksheet. On the hidden worksheet, I've coded a button to hide it again. But how do I get the button to take me back to the original worksheet (rather than going to the one next to the hidden sheet)? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to create a Public variable as Integer
Than in you open/goto hidden worksheet you can set the variable = to the active sheet index x = activesheet.index Than in your code to go back to the orginal (calling) worksheet, use Sheets(x).Activate or Sheets(x).Select Since x is declared as Public - it will retain it's value until it is changed or the workbook is closed. -- steveB Remove "AYN" from email to respond "meb081505" wrote in message ... Actually, let me clarify that the "open/go to hidden worksheet" button is on a number of different worksheets, so simply coding the button to go back to a specific worksheet will not do. It needs to remain generic and go back to the worksheet that opened it in the first place. I hope this makes sense . . . "meb081505" wrote: I've programmed a button to open/go to a hidden worksheet. On the hidden worksheet, I've coded a button to hide it again. But how do I get the button to take me back to the original worksheet (rather than going to the one next to the hidden sheet)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
GOTO PREVIOUS...? | Excel Discussion (Misc queries) | |||
Subtract # of days from date, but if not sat, goto previous sat? | Excel Discussion (Misc queries) | |||
Goto next visible worksheet | Excel Programming | |||
GoTo the cells in another worksheet that are linked | Excel Worksheet Functions | |||
GoTo Worksheet based on which button clicked | Excel Programming |