Hi,
I want to set up a looping macro in VBA so that it looks at the first column of the work book and if this is empty, the entire row is hidden.
I have got the code below - the lopping works just cant get the correct code for hidding the row.
Sub printpage()
Dim main As Worksheet
Dim mrow As Long
Set main = ThisWorkbook.Worksheets("WORKPLANNER")
mrow = 8
Do Until mrow = 352
If main.Cells(mrow, 1) = "" Then
main.Cells(mrow, "") = "test"Else
End If
mrow = mrow + 1
Loop
End Sub
also when i print a worksheet with a number of hidden rows is there a way for Excel to ignore these completely.
Thanks
Steven
Bookmarks