Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am working with two sheets in the same workbook. I move between the two
sheets using active buttons with assigned macros. How do I get the macro in the second sheet to return to the active cell in the first sheet? Many thanks Alex.W |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi,
add code like this or similar in the macro sub mac1() dim sh as worksheet dim rng as range set sh = activeworksheet 'remember this sheet set rng = activecell 'remember this cell Sheets("sheet2").Activate 'do macro stuff sh.Activate 'return to previouse active sheet rng.Select 'return to previouse active cell End Sub regards FSt1 "Alex.W" wrote: I am working with two sheets in the same workbook. I move between the two sheets using active buttons with assigned macros. How do I get the macro in the second sheet to return to the active cell in the first sheet? Many thanks Alex.W |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks very much, it certainly helped.
Alex.W "FSt1" wrote: hi, add code like this or similar in the macro sub mac1() dim sh as worksheet dim rng as range set sh = activeworksheet 'remember this sheet set rng = activecell 'remember this cell Sheets("sheet2").Activate 'do macro stuff sh.Activate 'return to previouse active sheet rng.Select 'return to previouse active cell End Sub regards FSt1 "Alex.W" wrote: I am working with two sheets in the same workbook. I move between the two sheets using active buttons with assigned macros. How do I get the macro in the second sheet to return to the active cell in the first sheet? Many thanks Alex.W |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null | Excel Discussion (Misc queries) | |||
value of the active cell | Excel Worksheet Functions | |||
Function to return the active sheet name | Excel Worksheet Functions | |||
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. | Excel Discussion (Misc queries) | |||
Sum to active cell | Excel Discussion (Misc queries) |