VBA: Show Specific Row on Top

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,502
Office Version
  1. 2016
Platform
  1. Windows
I am calling these macros to hide specific rows which is working fine. All i need is when a macro is triggered then the screen should
show Row 144 on top.
Code:
Sub bedsets()
'
' bedsets Macro
'


'
    ActiveWindow.SmallScroll Down:=-3
    Rows("147:199").Select
    Selection.EntireRow.Hidden = False
    Range("I149").Select
    ActiveWindow.SmallScroll Down:=39
    Rows("180:198").Select
    Selection.EntireRow.Hidden = True
    Range("B145").Select
End Sub
Sub jerseyfitted()
'
' jerseyfitted Macro
'


'
    ActiveWindow.SmallScroll Down:=9
    Rows("147:199").Select
    Selection.EntireRow.Hidden = False
    Range("K148:K149").Select
    ActiveWindow.SmallScroll Down:=3
    Rows("148:180").Select
    Selection.EntireRow.Hidden = True
    Range("B145").Select
End Sub
Sub both()
'
' both Macro
'


'
    ActiveWindow.SmallScroll Down:=6
    Rows("147:199").Select
    Selection.EntireRow.Hidden = False
    Range("B145").Select
End Sub
 
Last edited by a moderator:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Add this line to each macro
Code:
ActiveWindow.ScrollRow = 144
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,104
Messages
6,128,856
Members
449,472
Latest member
ebc9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top