Results 1 to 2 of 2

Thread: Cycle through sheet tabs
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Dec 2002
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Cycle through sheet tabs

    I have the following that cycles through sheet tabs but I need it to skip a tab if tab is named "Debt" and then continue to cycle through remaining sheets.

    If ActiveSheet.Name <> "Data" Then
    Do Until ActiveSheet.Name = "Data"

    How do I tell it to skip that tab but continue to reaching the "Data" tab.

  2. #2
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,590
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Cycle through sheet tabs

    Maybe:
    Code:
    Sub CycleToData()
    Dim i As Long
    For i = 1 To Sheets.Count
        If Sheets(i).Name = "Data" Then
            Sheets(i).Select
            Exit Sub
        End If
    Next i
    End Sub
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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