excel multilple sheets

  • Thread starter Thread starter Arr
  • Start date Start date
A

Arr

Need to branch to another sheet in the workbook and then return to the
sheet that the branch was started from!

Now for the kicker

The user can change the name of the sheet that the program runs from!!
 
Arr,

Put this in a module:

Dim SheetReturn As String

Sub GotoSheet()
SheetReturn = ActiveSheet.Name ' save current sheet name
Sheets("Sheet2").Select
End Sub

Sub GoBackSheet()
If SheetReturn <> "" Then Sheets(SheetReturn).Select
SheetReturn = ""
End Sub

Run the macros from the respective sheets.
 
Back
Top