Oct 29 2021 04:28 AM
I have this code
Sub unhideAll()
Dim lr As Integer
lr = Cells(Rows.Count, 2).End(xlUp).Row
ThisWorkbook.Worksheets("Kitchen").Rows("2:"&lr).Hidden = False
End Sub
But I want it to look like this
Sub unhideAll()
Dim lr As Integer, a As Integer
lr = Cells(Rows.Count, 2).End(xlUp).Row
a = 2
ThisWorkbook.Worksheets("Kitchen").Rows("a:"&lr).Hidden = False
End Sub
But this doesn't seem to work
How do you enter saved integers into a range in excel?
Oct 29 2021 06:14 AM
Sub unhideAll()
Dim lr As Integer, a As Integer
lr = Cells(Rows.Count, 2).End(xlUp).Row
a = 2
ThisWorkbook.Worksheets("Kitchen").Rows(a & ":" & lr).Hidden = False
End Sub
Is this what you are looking for?