+ Reply to Thread
Results 1 to 10 of 10

VBA to cycle through worksheets

  1. #1
    Registered User
    Join Date
    04-10-2019
    Location
    California
    MS-Off Ver
    16.0.11425.20200
    Posts
    14

    VBA to cycle through worksheets

    Please Login or Register  to view this content.
    I am trying to delete blank rows in selected worksheets; however, the above code only allows me to select the active worksheet (Only one). How can I manipulate the code that will allow me to cycle through all of the worksheets, not just one. I could have up to 15 different worksheets, sometimes 8. I want it to cycle through all of them and delete all blank rows.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: VBA to cycle through worksheets

    .
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: VBA to cycle through worksheets

    Hello A1cswiz,

    You could try something a little simpler as follows if it suits you:-


    Please Login or Register  to view this content.
    This code assumes that entire rows are blank in each worksheet.

    I hope that this helps.

    Cheerio,
    vcoolio.

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: VBA to cycle through worksheets

    @Logit:-

    Geez you're quick!

    Cheerio,
    vcoolio.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,555

    Re: VBA to cycle through worksheets

    Try
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: VBA to cycle through worksheets

    Quote Originally Posted by vcoolio View Post
    @Logit:-

    Geez you're quick!

    Cheerio,
    vcoolio.



    Too funny !

  7. #7
    Registered User
    Join Date
    04-10-2019
    Location
    California
    MS-Off Ver
    16.0.11425.20200
    Posts
    14

    Re: VBA to cycle through worksheets

    That works perfectly, thanks for the reply

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: VBA to cycle through worksheets

    .
    You are welcome.

  9. #9
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: VBA to cycle through worksheets

    Hello A1cswiz,

    I'm not sure to whom you are referring but you're welcome anyway.

    Cheerio,
    vcoolio.

  10. #10
    Registered User
    Join Date
    04-10-2019
    Location
    California
    MS-Off Ver
    16.0.11425.20200
    Posts
    14
    Quote Originally Posted by vcoolio View Post
    Hello A1cswiz,

    I'm not sure to whom you are referring but you're welcome anyway.

    Cheerio,
    vcoolio.
    I’m referring to everyone in the whole thread, especially you man, thanks

+ 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. [SOLVED] Cycle Through Specific Worksheets & Paste Data In Each Sheet
    By DDM64 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2012, 11:59 PM
  2. [SOLVED] Cycle through worksheets code not quite right
    By Vaslo in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-18-2012, 10:44 AM
  3. Cycle Through Worksheets
    By seams192 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2010, 05:07 AM
  4. Cycle through worksheets vba
    By twhitezell in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-05-2010, 10:59 AM
  5. Cycle through worksheets and sum
    By David M C in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2006, 02:10 PM
  6. [SOLVED] How do I cycle through all of the worksheets
    By DMB in forum Excel General
    Replies: 1
    Last Post: 01-08-2006, 08:25 PM
  7. Replies: 0
    Last Post: 01-08-2006, 07:30 PM
  8. Cycle through all worksheets
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-26-2005, 09:50 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