Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Macro to go back to last used sheet

Hello,

Can somebody help me. I need a macro that activate the forelast used
sheet.

For example: I had done something in sheet 1 and then I jump to sheet
5.
I do some editing in sheet 5 and when I click on the "go back" button
I want automatic jump back to the forelast activated sheet (in this
case sheet 1).

Is there a solution.

regards and thanks,
Johan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro to go back to last used sheet

On Jul 11, 1:44 pm, johan wrote:
Hello,

Can somebody help me. I need a macro that activate the forelast used
sheet.

For example: I had done something in sheet 1 and then I jump to sheet
5.
I do some editing in sheet 5 and when I click on the "go back" button
I want automatic jump back to the forelast activated sheet (in this
case sheet 1).

Is there a solution.

regards and thanks,
Johan


Johan,

I can't think of an easy way to achieve this since Excel doesn't track
user movements around a workbook in the same way as Internet Explorer
does.

One way to achieve this however would be to put a small piece of code
under the Worksheet_Activate() event on each of your worksheets. The
code could call a public sub eg StoreSheetName which would store the
name of each sheet in a table somewhere.

Then, when your user clicks "Back", you'd link this to a macro which
looks up the 2nd last row of your table. If you only need your "Back"
button to work once, you'd clear the data table at that point, then go
to the sheet name from the 2nd last row.

If you need your "Back" button to work more than once, you'd clear
everything from the 2nd last row onwards (inclusive) then go to the
sheet.

regards

Jeff

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
last sheet or go back Shane New Users to Excel 3 August 23rd 07 01:16 AM
copy back macro/roll back moh Excel Worksheet Functions 4 March 5th 07 02:19 PM
Print sheet 1 on front sheet 2 on back of a page J.W. Aldridge Excel Programming 1 November 16th 06 10:23 PM
4 variables to one sheet, then back to original sheet with answer Howard Excel Programming 1 January 3rd 04 09:17 PM
Running sheet from another sheet ... and back Henry[_4_] Excel Programming 0 July 8th 03 11:36 PM


All times are GMT +1. The time now is 04:14 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"