+ Reply to Thread
Results 1 to 5 of 5

hide all sheets when macro is disabled

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    18

    hide all sheets when macro is disabled

    continued from: http://www.excelforum.com/excel-prog...-interval.html

    Quote Originally Posted by jewelsharma View Post
    Option Explicit forces explicit declaration of all variables in the code. That is why i had to declare ws as worksheet using the Dim statement before using it in the code. It is recommended to have it - however for this code it wouldn't have mattered.

    I'm not sure I exactly follow what you imply here. But yes, you can hide all the sheets at first and then "unhide" at the start of the macro. Let's say you have a "Start" sheet.. then:
    Please Login or Register  to view this content.
    Please do mark this thread as "Solved". If you have any follow-up queries, kindly raise them via separate thread. You may provide a link to this thread within the new thread to connect them. This way you are likely to receive faster responses from the forum. Cheers!
    Please help! The workbook is used by other people too. I cannot just tell them to hide the sheets, it defeats the purpose. What I want is, when macro is disabled, they will only see the START sheet, otherwise, all sheets will be visible. To add to this, a new sheet is added everyday. Sheets name are calendar dates in mmdd format

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: hide all sheets when macro is disabled

    Helping create new solutions for new ideas is always fun, but your request is very common and turnkey solutions are found all over the web.

    Google: Excel VBA Force Macros Enabled

    Any of the top 10 links will most likely serve you instantly. The most thorough solutions are always found on Chip Pearson's site, so watch for that name.

    http://www.cpearson.com/excel/EnableMacros.aspx
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: hide all sheets when macro is disabled

    Thanks for the link! I have copied the codes and successfully made it to work except for the cells being unlocked after all the sheets become visible. How do I fix it? Thanks again!

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-04-2013
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: hide all sheets when macro is disabled

    Sorry i was too fast i forgot to protect the sheet first, my bad! :-(

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: hide all sheets when macro is disabled

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. 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] How to unhide/hide sheets with Macro?
    By jgomez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2013, 11:22 AM
  2. Replies: 2
    Last Post: 04-18-2011, 01:56 AM
  3. conflict between auto save&close macro and show/hide sheets macro
    By alexandruc in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-18-2009, 11:56 AM
  4. [SOLVED] macro to hide sheets
    By ditchy in forum Excel General
    Replies: 8
    Last Post: 05-01-2005, 10:06 PM
  5. Replies: 5
    Last Post: 02-08-2005, 01:06 PM

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