+ Reply to Thread
Results 1 to 4 of 4

Running the same macro across multiple VISIBLE sheets only

  1. #1
    Registered User
    Join Date
    02-11-2021
    Location
    Rockville, Maryland
    MS-Off Ver
    2016
    Posts
    4

    Running the same macro across multiple VISIBLE sheets only

    I am having trouble running a macro across only the visible sheets in a workbook.

    I am trying to hide specific rows across multiple visible worksheets where the value in a specified range is 0. I have figured out how to select the visible sheets and how to hide the specified rows that meet the condition but when I call that macro it only does it for one of the sheets. I would like to have this macro run across all the sheets that have been selected. Below is what I currently am using. Any help is appreciated.

    Please Login or Register  to view this content.
    Last edited by naltieri; 04-30-2021 at 11:31 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    9,671

    Re: Running the same macro across multiple VISIBLE sheets only

    Welcome to our Forum...

    Please take a moment to read our forum rules...here
    Your post does not comply with Rule # 2
    2. Programming code must be enclosed in code tags to improve readability. (A, Z)
    Please Login or Register  to view this content.
    So...Edit your post...Highlight the code and press the # button
    We can only assist once this has been done…
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere.....
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember......Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    9,671

    Re: Running the same macro across multiple VISIBLE sheets only

    Please Login or Register  to view this content.
    Or if the 0 is not important, replace zeros with blanks and do a special cells blanks row hide....No need for 2nd loop then
    Something like this...
    Please Login or Register  to view this content.
    Last edited by sintek; 04-30-2021 at 11:42 AM.

  4. #4
    Registered User
    Join Date
    02-11-2021
    Location
    Rockville, Maryland
    MS-Off Ver
    2016
    Posts
    4

    Re: Running the same macro across multiple VISIBLE sheets only

    Thank you. That worked perfect.

+ 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. running a macro on multiple sheets
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-24-2015, 08:11 AM
  2. Question regarding running Macro across multiple sheets
    By whawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2014, 07:32 PM
  3. Running Same macro on Multiple sheets
    By shilpigupta79 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2013, 03:29 AM
  4. Running Macro on multiple sheets
    By VKS in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-21-2013, 12:10 PM
  5. worksheet visible whilst macro running
    By johnsmurray2010 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2012, 02:59 PM
  6. Running macro in multiple sheets
    By shak1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2009, 06:36 AM
  7. Running a macro for all visible worksheets in a workbook
    By Craig_Richards in forum Excel General
    Replies: 2
    Last Post: 08-08-2005, 07:24 AM

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