Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default displaying specific rows on screen

Hi
I would like to control which lines are displayed on screen.
For example:- when user gets down to line 35 I would like to display form
line 20 onwards. When user gets to line 55 display from line 45 onwards.

I can get the screen to move by using:-

If Target.Row = 35 Then
Worksheets("Expense Sheet").Activate
ActiveWindow.ScrollRow = 20
End If

However when the user moves to line 36 the screen reverts back to displaying
from row 1 onwards.

If I test for Target.Row 34 the screen blinks /flashed every time this
partt of the macro runs.

How do I get the screen to display from row 20 and stay like that until
another ScrollRow tells it to display from row 45 onwards . . . . and so on?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default displaying specific rows on screen

Not 100% sure exactly how you want it to work but this might be it...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Row
Case Is 55
ActiveWindow.ScrollRow = 45
Case Is 35
ActiveWindow.ScrollRow = 20
End Select
End Sub

--
HTH...

Jim Thomlinson


"johnsail" wrote:

Hi
I would like to control which lines are displayed on screen.
For example:- when user gets down to line 35 I would like to display form
line 20 onwards. When user gets to line 55 display from line 45 onwards.

I can get the screen to move by using:-

If Target.Row = 35 Then
Worksheets("Expense Sheet").Activate
ActiveWindow.ScrollRow = 20
End If

However when the user moves to line 36 the screen reverts back to displaying
from row 1 onwards.

If I test for Target.Row 34 the screen blinks /flashed every time this
partt of the macro runs.

How do I get the screen to display from row 20 and stay like that until
another ScrollRow tells it to display from row 45 onwards . . . . and so on?

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
Print has some blank rows but screen has data in rows marvelous p Excel Discussion (Misc queries) 1 February 9th 09 02:57 PM
Displaying specific numbers WavMaster Excel Discussion (Misc queries) 1 February 7th 09 04:36 AM
My screen is only displaying in B&W- HELP!! Mrutin Excel Discussion (Misc queries) 2 April 11th 07 09:36 PM
Paging down through spreadsheet displaying data on full screen Grrrrrumpy Excel Discussion (Misc queries) 0 March 28th 07 04:32 AM
Displaying value of specific cell within a range, with IF function...? Steve Excel Discussion (Misc queries) 1 January 14th 05 02:23 AM


All times are GMT +1. The time now is 08:54 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"