C
Carl
I am using the following two macros to return the user to the last active
sheet after visiting another sheet (when they leave the first sheet the first
macro runs; when wanting to return, they run the second). The problem is that
it forces them to go momentarily to the sheet "Summary" first. Is there a
better way to do this? I searched all the other strings and could not find
something that would work. Hiding the "Summary" sheet did not work either.
Thanks in adavance,
Sub FreezePreviousWorksheet()
Previous = ActiveSheet.Name
Application.Goto Sheets("Summary").Range("A1")
ActiveCell = Previous
End Sub
Sub ReturnToPreviousWorksheet()
Previous = Sheets("Summary").Range("A1")
Sheets(Previous).Select
End Sub
sheet after visiting another sheet (when they leave the first sheet the first
macro runs; when wanting to return, they run the second). The problem is that
it forces them to go momentarily to the sheet "Summary" first. Is there a
better way to do this? I searched all the other strings and could not find
something that would work. Hiding the "Summary" sheet did not work either.
Thanks in adavance,
Sub FreezePreviousWorksheet()
Previous = ActiveSheet.Name
Application.Goto Sheets("Summary").Range("A1")
ActiveCell = Previous
End Sub
Sub ReturnToPreviousWorksheet()
Previous = Sheets("Summary").Range("A1")
Sheets(Previous).Select
End Sub