meangreen
Board Regular
- Joined
- Jan 29, 2007
- Messages
- 169
I have a macro that unhides the next row when I enter someting into the row above. I need help with my code to get it to automatically select the cell in column C of the newly unhidden row. I will need this to happen each time a new row is unhidden (up to 50 times). Here's my code:
Private Sub Worksheet_Calculate()
Dim rng As Range
Set rng = Range("A24")
If rng.Value <> "" Then
Application.EnableEvents = False
Rows("25:75").EntireRow.Hidden = True
Rows("25:" & rng.Value + 24).Hidden = False
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_Calculate()
Dim rng As Range
Set rng = Range("A24")
If rng.Value <> "" Then
Application.EnableEvents = False
Rows("25:75").EntireRow.Hidden = True
Rows("25:" & rng.Value + 24).Hidden = False
Application.EnableEvents = True
End If
End Sub