Results 1 to 7 of 7

I need a Loop

Threaded View

  1. #1
    Registered User
    Join Date
    05-14-2019
    Location
    Provo, Utah
    MS-Off Ver
    2013
    Posts
    26

    Arrow I need a Loop

    I need a VBA loop that will loop through my tabs and add an increasing number to the cell J1
    The VBA needs to not need the worksheet name to be specified as it changes depending upon the imput.

    Here is what I have so far
    Sub Increasing Number()
    
        Dim strPath As String
        Dim xWs As Worksheet
    
        strPath = ActiveWorkbook.Path & "\"
        
           For Each xWs In Application.ActiveWorkbook.Worksheets
             If xWs.Name <> "Button" And xWs.Name <> "CopyPaste" And xWs.Name <> "RMR" And xWs.Name <> "Reformat Machine" And xWs.Name <> "Equipment" Then
             'Not sure what to put here that will make it work'
            End If
        Next xWs
            
    End Sub
    Last edited by Glervey; 05-23-2019 at 12:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to loop through cell-defined range and paste table output after each loop.
    By mscott123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2019, 03:41 AM
  2. Replies: 13
    Last Post: 07-08-2018, 05:22 AM
  3. [SOLVED] (Beginner help) For loop inside do loop that displays information from reference sheet.
    By lediable007 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-08-2016, 03:20 PM
  4. [SOLVED] Auto email loop with formatted table data breaking on second loop VBA
    By Who_else in forum Excel General
    Replies: 6
    Last Post: 03-24-2016, 06:22 AM
  5. [SOLVED] VBA to loop within a loop of multiple blocks of data (currentregion) ... Expert needed
    By Jim885 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2016, 08:28 PM
  6. [SOLVED] Copy dynamically changing column and Paste using VBA Loop (Loop within Loop)
    By nixon72 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2013, 12:46 PM
  7. Why did an inner loop variable start overwriting the outer loop range suddenly?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2012, 03:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1