Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
last sheet or go back | New Users to Excel | |||
copy back macro/roll back | Excel Worksheet Functions | |||
Print sheet 1 on front sheet 2 on back of a page | Excel Programming | |||
4 variables to one sheet, then back to original sheet with answer | Excel Programming | |||
Running sheet from another sheet ... and back | Excel Programming |