Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just another option if you don't like working w/ strings.
Sub Demo() Dim TopRow As Long Dim BottomRow As Long TopRow = 8 BottomRow = 12 Rows(TopRow).Resize(BottomRow - TopRow + 1).Hidden = True End Sub -- HTH :) Dana DeLouis "Karen53" wrote in message ... Hi, I have a procedure where I determine the range of rows I want to hide. I have tested the values and things are working up to the Rows statement. How do I use variables in the statement below? I have tried several combinations and nothing works. Can anyone tell me what I'm missing? Both variables are Dim as Long Rows(LastRow&":"& BottomRow).Select This gives me a compile error, expected list separator or ) Selection.EntireRow.Hidden = True Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using variables to select multiple rows using a macro | Excel Programming | |||
using variables to select multiple rows using a macro | Excel Programming | |||
Select Range using variables | Excel Programming | |||
VBA-Select several ranges using variables | Excel Programming | |||
Using variables to select a range | Excel Programming |