I'm trying to unhide rows one at a time using VBA, I have found some code that will do this, but the starting row that I want to unhide changes and I want stop unhiding at a dyanmic row as well.
The code I've been using is below, and I'm trying to modify "a1" and "a100" to reference two named/defined cells in my workbook that dynamically tells me the start and end rows, but I don't know how to incorporate them?
Dim myr As Range
For Each myr In Range("a1", "a100")
If Rows(myr.Row).Hidden = True Then
Rows(myr.Row).Hidden = False
Exit Sub
End If
Next myr
End Sub
I pretty much a beginner on VBA, so apologies if something here doesn't make sense.
Any thoughts welcomed!
cheers
The code I've been using is below, and I'm trying to modify "a1" and "a100" to reference two named/defined cells in my workbook that dynamically tells me the start and end rows, but I don't know how to incorporate them?
Dim myr As Range
For Each myr In Range("a1", "a100")
If Rows(myr.Row).Hidden = True Then
Rows(myr.Row).Hidden = False
Exit Sub
End If
Next myr
End Sub
I pretty much a beginner on VBA, so apologies if something here doesn't make sense.
Any thoughts welcomed!
cheers