Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mac Mac is offline
external usenet poster
 
Posts: 213
Default Scroll locked in multiple worksheets

How can I get the cursor to remain in the same position when using multiple
worksheets?
For example, all worksheets start in cell A5 nad then if I move to A10, all
worksheets go to A10 and so on.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Scroll locked in multiple worksheets

Hi Mac,

Paste this into the ThisWorkbook module. It should do the trick.

Option Explicit

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)

Dim ws As Worksheet

Application.ScreenUpdating = False
Application.EnableEvents = False

For Each ws In Worksheets
ws.Activate
ws.Range(Target.Address).Activate
Next ws

Sh.Activate
Application.EnableEvents = True

End Sub
Regards,

Gary

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Scroll locked in multiple worksheets

Sorry, Mac! I read your request as cell selection, not scrolling.
That's a different problem. If I have more time, I'll post something if
nobody answers your question.

Gary

  #4   Report Post  
Posted to microsoft.public.excel.programming
Mac Mac is offline
external usenet poster
 
Posts: 213
Default Scroll locked in multiple worksheets

Gary, thanks for the info. i will try it.
Mac

"GaryDK" wrote:

Hi Mac,

Paste this into the ThisWorkbook module. It should do the trick.

Option Explicit

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)

Dim ws As Worksheet

Application.ScreenUpdating = False
Application.EnableEvents = False

For Each ws In Worksheets
ws.Activate
ws.Range(Target.Address).Activate
Next ws

Sh.Activate
Application.EnableEvents = True

End Sub
Regards,

Gary


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
excell is "scroll locked" leeziff Excel Discussion (Misc queries) 1 October 8th 09 12:20 AM
Worksheet is scroll LOCKED Ayo Excel Discussion (Misc queries) 2 September 22nd 08 06:16 PM
How do I scroll between Excel worksheets with the mouse? DBP555 Excel Discussion (Misc queries) 4 July 11th 07 08:36 PM
How to link two worksheets thru a scroll-down bar? Edoardo Excel Discussion (Misc queries) 1 November 6th 06 05:18 PM
Worksheets -locked out of my own workbook. Rick M Excel Discussion (Misc queries) 1 October 13th 06 11:16 PM


All times are GMT +1. The time now is 12:09 PM.

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"