Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get the focus on a check box? reneatwork New Users to Excel 1 September 15th 06 02:52 PM
Setting the focus Orf Bartrop New Users to Excel 4 August 9th 06 05:36 AM
focus Capp Excel Discussion (Misc queries) 2 November 18th 05 07:25 PM
set focus tkaplan Excel Discussion (Misc queries) 3 September 27th 05 07:41 PM
Focus David Unger Excel Worksheet Functions 20 March 21st 05 06:43 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"