Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Key Focus
Hello. I am looking for something that will allow me to return the key focus of the Excel sheet to where it was prior to a procedure running. I have to activate the cells for this particular loop and I would like to take the user back to whatever cell they were originally on. So, I would be looking for something that captures the focus of where they were, keeps it as a variable and then at the end of my procedure returns them to their previous spot. Anyone out there that can help with this? Thanks. Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Key Focus
Dan, simply store the start address in a variable, and select that cell
before exiting the macro. Example if you are remaining in the same workbook: StartCell = ActiveCell.Address StartSheet = ActiveSheet.Name ....macro fun... Sheets(StartSheet).Select Range(StartCell).Select Hope this helps... Jeff "Dan Gesshel" wrote in message ... Hello. I am looking for something that will allow me to return the key focus of the Excel sheet to where it was prior to a procedure running. I have to activate the cells for this particular loop and I would like to take the user back to whatever cell they were originally on. So, I would be looking for something that captures the focus of where they were, keeps it as a variable and then at the end of my procedure returns them to their previous spot. Anyone out there that can help with this? Thanks. Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I get the focus on a check box? | New Users to Excel | |||
Setting the focus | New Users to Excel | |||
focus | Excel Discussion (Misc queries) | |||
set focus | Excel Discussion (Misc queries) | |||
Focus | Excel Worksheet Functions |