+ Reply to Thread
Results 1 to 10 of 10

Hide & Unhide specific sheets Macro Check and Advice

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Hide & Unhide specific sheets Macro Check and Advice

    Hi I've written this for Hiding and Unhiding specific sheets from large sheet set. However it is running too slow. Please advise on improving. Thanks!

    Please Login or Register  to view this content.
    Last edited by huard; 02-07-2014 at 05:42 AM.

  2. #2
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Thanks Fotis. I've edited the posted and included the code tags.

  3. #3
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Hide & Unhide specific sheets Macro Check and Advice

    I would start with adding

    Please Login or Register  to view this content.
    to the beginning of your code

    and
    at the end (before your end sub)
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Is there a reason you need dynamic sheet selection?

    Only I notice the very first section of your macro hides the sheet your looking at and the next one. Is that by design?

  5. #5
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Thank you Nickmax1. This is a smart solution!

  6. #6
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Quote Originally Posted by swoop99 View Post
    Is there a reason you need dynamic sheet selection?

    Only I notice the very first section of your macro hides the sheet your looking at and the next one. Is that by design?
    Yes, I put those sheets in groups. Say we have 100 sheets in workbook, including 10 for class A, 20 for class B, 25 for class C ... You wouldn't want to manually select them.

  7. #7
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Would it be easier to have 3 different macros, all run by either CTRL-whatever or buttons on a master sheet, that toggle hiding for all sheets of a particular class?

    What is your sheet naming convention like? ie, this'll be really easy if all your Class A sheets starts with "A". For example.

  8. #8
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Quote Originally Posted by swoop99 View Post
    Would it be easier to have 3 different macros, all run by either CTRL-whatever or buttons on a master sheet, that toggle hiding for all sheets of a particular class?

    What is your sheet naming convention like? ie, this'll be really easy if all your Class A sheets starts with "A". For example.
    Yes I use a master sheet and buttons in place. I have a variety of sheet names in class A. May even start with numbers.

    Does it matter? I don't think there is any problem running the code at this stage.

    Any better ideas to simplify the code?
    Last edited by huard; 02-07-2014 at 07:13 AM.

  9. #9
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Hide & Unhide specific sheets Macro Check and Advice

    huard

    I think a sample workbook is needed.

  10. #10
    Registered User
    Join Date
    02-07-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide & Unhide specific sheets Macro Check and Advice

    Quote Originally Posted by nickmax1 View Post
    huard

    I think a sample workbook is needed.
    Thanks Nickmax1. I think your answer has solved the problem.

+ 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] Hide Unhide specific sheets with cell value
    By aksnave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-27-2012, 06:06 PM
  2. Need macro to check values and hide/unhide specific worksheets
    By amsnss in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2011, 01:53 PM
  3. How to HIDE/UNHIDE Specific Sheets Using a TOGGLE Button?
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-16-2011, 02:58 AM
  4. macro to hide and unhide sheets
    By EdMac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-07-2007, 07:03 AM
  5. [SOLVED] Check Box Macro to hide and unhide a column
    By Daphne in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-26-2006, 08:55 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