From: ordnance1 on
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

From: Rick Rothstein on
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" <ordnance1(a)comcast.net> wrote in message
news:7C8A4A78-DFB6-4839-8ADA-284EC1BA661B(a)microsoft.com...
> 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

From: ordnance1 on
My problem is that the worksheet will not be active (nor do I want it to be)
so I was hoping that it could reside within the With statement.

"Rick Rothstein" <rick.newsNO.SPAM(a)NO.SPAMverizon.net> wrote in message
news:OHTwA0A3KHA.4416(a)TK2MSFTNGP06.phx.gbl...
> 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" <ordnance1(a)comcast.net> wrote in message
> news:7C8A4A78-DFB6-4839-8ADA-284EC1BA661B(a)microsoft.com...
>> 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
>