Hey guys, I have a macro that I want to keep doing over and over until I change a the value in A7
I have worked out the action of the Macro (rotating pages)
But I am stuck with the Do While
Here is my code, thanks in advance for the help
I have worked out the action of the Macro (rotating pages)
But I am stuck with the Do While
Here is my code, thanks in advance for the help
Code:
Sub Rotating()Application.OnTime Now + TimeValue("00:00:05"), "ShowNextSheet"
End Sub
Sub ShowNextSheet()
Dim lastIndex As Integer, nextShtIndex As Integer
Do While Range(A7) = "Yes"
lastShtIndex = Worksheets.Count
nextShtIndex = ActiveSheet.Index + 1
If nextShtIndex <= lastShtIndex Then
Worksheets(nextShtIndex).Select
Rotating
Else
Sheets("Running Sheet").Activate
End If
Loop
End Sub