View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kent McPherson[_3_] Kent McPherson[_3_] is offline
external usenet poster
 
Posts: 11
Default moving to next worksheet

Tom Ogilvy wrote:
Sub AA()

Set sh = ActiveSheet
On Error Resume Next
Do While sh.Next.Visible < xlSheetVisible
If Err < 0 Then Exit Do
Set sh = sh.Next
Loop
sh.Next.Activate
On Error GoTo 0

End Sub




Thanks! Works perfectly.