View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Next Worksheet in code

Sub ActivateNextSheet()
Dim index As Integer
index = ActiveSheet.index
If index < Sheets.Count Then
Sheets(index + 1).Activate
Else
Sheets(1).Activate
End If
End Sub


HTH
--
AP

"Gary S" a écrit dans le message de news:
...
Basic vba question.

How do I go to the next worksheet using code?
--
Thanks for your help!
Gary S