Code for button to hide/unhide rows
Toppers
Code work flawlessly, after changing last header row, as it wanted to hide
as well. Thankyou for your help.
--
Regards
Chris
"Toppers" wrote:
Something like ....??
Sub HideG()
lastrow = Cells(Rows.Count, "G").End(xlUp).Row
For i = 7 To lastrow
If Cells(i, "G") < "" Then Rows(i).Hidden = True
Next i
End Sub
Sub unhideG()
Rows.Hidden = False
End Sub
"Chris" wrote:
I'm having problems with this code. I've a worksheet for all levels of user.
Rows A1-G7 = header, Rows 8+ & Columns A-G = user data, Column G as trigger.
Would like to have Sub Button1_Click() to hide rows, if date or data in G;
and have a second button Sub Button2_Click() to unhide all. I'm close but no
cigar.
--
Regards
|