Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to return to Current Sheet and Cell
I have a macro that is used in several different areas in my workbook. The
macro changes values in several sheets from the sheet I'm on...and that all works. I'd like the macro to return me to whatever active sheet and cell I am currently at....how can I accomplish this? Thanks Steve -- ---------------------------------------------------- This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to return to Current Sheet and Cell
'Place this at the start of your macro.....
Dim wb as workbook Dim ws as worksheet Dim c as range set wb=activeworkbook Set ws=wb.activesheet set c=activecell 'Your code here 'Place this at the end of your macro..... wb.activate ws.select c.select -- XL2003 Regards William "Steve Klenner" wrote in message ... I have a macro that is used in several different areas in my workbook. The macro changes values in several sheets from the sheet I'm on...and that all works. I'd like the macro to return me to whatever active sheet and cell I am currently at....how can I accomplish this? Thanks Steve -- ---------------------------------------------------- This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to return to Current Sheet and Cell
Hi Steve:
In Addition to William's suggestion, try amending your code to avoid sheet and range selections: most manipulation can be effected without making such selections. --- Regards, Norman "Steve Klenner" wrote in message ... I have a macro that is used in several different areas in my workbook. The macro changes values in several sheets from the sheet I'm on...and that all works. I'd like the macro to return me to whatever active sheet and cell I am currently at....how can I accomplish this? Thanks Steve -- ---------------------------------------------------- This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return range of cell values based on current date | Excel Worksheet Functions | |||
Macro for Graphing Current Sheet? | Excel Programming | |||
Return number of current sheet | Excel Worksheet Functions | |||
Return to Current Sheet in On (sheet activate) event macro | Excel Programming | |||
Use current sheet name in Macro | Excel Programming |