Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there anyway to refer to the previous selected sheet in a macro?
In other words, the macro is designed on a sheet named "Master" and switches back and forth between that sheet and another, lets call it "Output". "Master" is designed to be copied and renamed, but it always references "Output" in certain macros. The code currently begins on "Master" and goes something like this: Range("A1:A10").Copy Sheets("Output").Select Range("A1:A10").Paste Sheets("Master").Select ....and so on. I need that same functionality if "Master" is named "Master2" or "AbeVigoda" or whatever. Does VBA include syntax for Previous Sheet or Last sheet or anything so that you can tell the macro to go back to sheet it started from? Thanks to all. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
use macro button to run macro in protected sheet | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions | |||
referring to previous sheet | Excel Discussion (Misc queries) |