Jump between sheets

  • Thread starter Thread starter Graham Haughs
  • Start date Start date
G

Graham Haughs

Is it possible in a multi-sheet workbook to create a procedure to jump
back to the sheet and the place you were in previously, ie without using
the tabs to move about. If you were in sheet 6 for example and moved by
a macro to Sheet 20, is there a way to identify that you have just been
in sheet 6 and use a macro to be linked to a command button for example
to jump back to it. Hope this is well enough explained and I would be
grateful for any guidance.

Kind regards
Graham Haughs
Turriff, Scotland
 
This is the way I do it:-

' Switch to/from summary sheet
'

If ActiveSheet.Name = "Summary" Then
oldsheet = Worksheets("Summary").Range("Z1").Value
Sheets(oldsheet).Select
Else
oldsheet = ActiveSheet.Name
Sheets("Summary").Select
Worksheets("Summary").Range("Z1").Value = oldsheet
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top