+ Reply to Thread
Results 1 to 3 of 3

Repeating VBA code for 80 sheets

  1. #1
    Registered User
    Join Date
    09-23-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    Repeating VBA code for 80 sheets

    Hi,

    I have the below code, and I want to repeat it for 80 sheets. The workbook has a total of 90 sheets, but I need to skip the first 10 sheets as they are different and unrelated.

    Please let me know if there is a way to do this. I have tried many different solutions I have found on the internet, but I can't seem to get them to work.

    Please Login or Register  to view this content.
    I know that I can put the following code at the beginning to make it select a particular sheet, but I don't know how to get it to loop between sheet numbers. All of the sheets are named completely differently, so I was thinking of selecting them using the sheet code name, but I don't want to just copy paste the code 80 times and change the sheet code name. I'm assuming there is a way to loop it and it would be a very short piece of code.

    Please Login or Register  to view this content.
    Where I would change the "10" to whatever sheet code is next. I don't know how to loop it so that the 10 changes to 11, then 12, and so on.

    Thanks in advance!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Repeating VBA code for 80 sheets

    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-23-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    Re: Repeating VBA code for 80 sheets

    Works like a charm!

    Thanks so much, and also for cleaning up my code that tiny bit. Very helpful! That little bit of code you helped me with actually taught me some little important things that I didn't realize before!

    Thanks again!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Repeating rows on multiple sheets
    By krlmlt89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2012, 02:08 AM
  2. autocomplete combobox not repeating on other sheets
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2011, 06:21 AM
  3. Help with repeating the code
    By rusoo7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2009, 07:05 AM
  4. Repeating work sheets
    By pauldarj in forum Excel General
    Replies: 1
    Last Post: 03-13-2008, 04:55 AM
  5. Repeating Cell Entries Between Sheets
    By Ed O'Brien in forum Excel General
    Replies: 9
    Last Post: 07-19-2006, 08:25 AM

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