Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    Watford, Hertfordshire, England
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jump to next sheet in workbook (2003)

    I want to jump to the next sheet in a workbook after running some code but will not know what the name of the worksheet is. Having jumped to the next sheet I then want to run that code again until no more sheets are left in the workbook.

    Any one got some good code?
    Neil Eustice
    Woody Worshipper

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jump to next sheet in workbook (2003)

    You could use a loop like this:

    For i = 1 To Worksheets.Count
    ' Run code for Worksheets(i) here
    ' If it is essential that the code runs in the active sheet, start with
    ' Worksheets(i).Select
    Next i

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    Watford, Hertfordshire, England
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jump to next sheet in workbook (2003)

    Nice one. Thanks
    Neil Eustice
    Woody Worshipper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •