LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Bringing focus back to source point upon subroutine run completion

Hi guys,

Let's say I'm working in Sheet13 with cursor on B3

Using Alt+F8, I call / run a sub from my personal.xls, for example:

Sub SwitchOffGridLinesWS()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ActiveWindow.DisplayGridlines = False
Next
End Sub

The sub finishes its job but the activesheet has changed
to the rightmost sheet's cell A1

How do I bring the cursor focus back to where I was when I ran the sub:
i.e. back to Sheet13 with cursor on B3 ?

Thanks for insights.
--
Rgds
Max
xl 97
---
Please respond, in newsgroup
xdemechanik <atyahoo<dotcom
----


 
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
Vlookup bringing back #N/A Afsha Excel Discussion (Misc queries) 2 July 5th 07 01:19 PM
Bringing quotations back up on screen flymeoutofhere Excel Discussion (Misc queries) 1 October 2nd 06 01:55 PM
How do I get focus back on an Excel file? Stumpiana Charts and Charting in Excel 1 November 18th 05 01:21 AM
Change focus from Userform back to Sheet rocketslinger[_2_] Excel Programming 5 January 11th 04 02:31 PM
Focus back from modeless userform to sheet RB Smissaert Excel Programming 4 September 5th 03 04:21 PM


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

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

About Us

"It's about Microsoft Excel"