Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Goto Previous worksheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Goto Previous worksheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Goto Previous worksheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GOTO PREVIOUS...? allgirlusa Excel Discussion (Misc queries) 2 July 10th 07 05:11 PM
Subtract # of days from date, but if not sat, goto previous sat? Fernando Excel Discussion (Misc queries) 3 May 1st 06 08:57 PM
Goto next visible worksheet Kent McPherson[_3_] Excel Programming 2 July 28th 05 11:58 PM
GoTo the cells in another worksheet that are linked ramudo Excel Worksheet Functions 1 November 24th 04 11:46 PM
GoTo Worksheet based on which button clicked Paul Martin Excel Programming 2 July 6th 04 06:22 AM


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"