countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, hope all is well!
The code here hops from 1 sheet to the other, and when it reaches the last sheet, it goes back to the first sheet.
Can you please help me with the code. I want the code skipping going to: Sheets3.
Thank you so much in advance!
The code here hops from 1 sheet to the other, and when it reaches the last sheet, it goes back to the first sheet.
Can you please help me with the code. I want the code skipping going to: Sheets3.
Thank you so much in advance!
Code:
Sub MoveNext()
On Error Resume Next
If Not ActiveWorkbook Is ThisWorkbook Then Exit Sub
Sheets(ActiveSheet.Index + 1).Activate
Range("a1").Select
If Err.Number <> 0 Then Sheets(1).Activate
Range("a1").Select
End Sub
Code:
Sub MyMacro()
Call MoveNext
Application.OnTime Now + TimeValue("00:00:03"), "mymacro"
End Sub
Last edited: