ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ScrollRow (https://www.excelbanter.com/excel-programming/441661-scrollrow.html)

ordnance1[_2_]

ScrollRow
 
What can I add to the code below to set the ScrollRow to 1 and the curser on
cell A3?


With Worksheets("March")
If .Range("C184").Value = "" Then
.Rows("184:228").Hidden = True
End If
If .Range("C184").Value < "" Then
.Rows("184:228").Hidden = False
End If
If .Range("C229").Value = "" Then
.Rows("229:273").Hidden = True
End If
If .Range("C229").Value < "" Then
.Rows("229:273").Hidden = False
End If
End With


Rick Rothstein

ScrollRow
 
Well, you can add this to the end of the code you posted...

ActiveWindow.ScrollRow = 1
Range("A3").Select

This will put the cursor on A3 of whatever worksheet is currently active.

--
Rick (MVP - Excel)



"ordnance1" wrote in message
...
What can I add to the code below to set the ScrollRow to 1 and the curser
on cell A3?


With Worksheets("March")
If .Range("C184").Value = "" Then
.Rows("184:228").Hidden = True
End If
If .Range("C184").Value < "" Then
.Rows("184:228").Hidden = False
End If
If .Range("C229").Value = "" Then
.Rows("229:273").Hidden = True
End If
If .Range("C229").Value < "" Then
.Rows("229:273").Hidden = False
End If
End With




All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com