YellowLabPro
10-04-2007, 08:21 AM
This is a two part question.
Depending on how the first part is answered is if I need to ask the second part.
I have a sheet with 133 rows, rows 5 to 15 is header information and 16 to 133 is the range that can hold data input.
The majority of the time I do not use the entire range, so I hide the unused rows in the range.
I do this w/ separate procedure- HideRowsOrderInfo.
I want to wrap an If Condition around the called procedure, that if it has already been run, then skip it, if it has not been run, then run it.
The way I will determine if the procedure needs to be run is if there are any blank rows between the lastrow and A16.
This returns an error expecting an array. I posted to show my approach.
There may be other issues to resolve, but I am taking them one at a time.
Row 133 has static data in it to provide a stop for the .end.
lrow = Cells.SpecialCells(xlCellTypeVisible(Rows.Count, 1)).End(xlUp).Row
If Range("A" & lrow - 1) = "" Then
Call HideRowsOrderInfo
End If
Depending on how the first part is answered is if I need to ask the second part.
I have a sheet with 133 rows, rows 5 to 15 is header information and 16 to 133 is the range that can hold data input.
The majority of the time I do not use the entire range, so I hide the unused rows in the range.
I do this w/ separate procedure- HideRowsOrderInfo.
I want to wrap an If Condition around the called procedure, that if it has already been run, then skip it, if it has not been run, then run it.
The way I will determine if the procedure needs to be run is if there are any blank rows between the lastrow and A16.
This returns an error expecting an array. I posted to show my approach.
There may be other issues to resolve, but I am taking them one at a time.
Row 133 has static data in it to provide a stop for the .end.
lrow = Cells.SpecialCells(xlCellTypeVisible(Rows.Count, 1)).End(xlUp).Row
If Range("A" & lrow - 1) = "" Then
Call HideRowsOrderInfo
End If