+ Reply to Thread
Results 1 to 5 of 5

how can i make this code work as a toggle?

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    how can i make this code work as a toggle?

    i found this post here

    now how can i make this a toggle?
    Please Login or Register  to view this content.
    so start with an if statement:
    Please Login or Register  to view this content.
    not sure of the terminology on the IF statement, but once that is figured out, it should work, right?

    thanks for your help.
    Last edited by dmcgov; 05-18-2016 at 12:51 PM. Reason: modded code

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: how can i make this code work as a toggle?

    That code will not really work - to address sheets using the array version of names, all the sheets have to be visible - so only the = False line will work.

    Here is code that will work to toggle your sheet visibility:

    Please Login or Register  to view this content.
    The If structure is

    Please Login or Register  to view this content.
    Like

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how can i make this code work as a toggle?

    Please Login or Register  to view this content.
    will this code work?

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: how can i make this code work as a toggle?

    No. If you want to use the If then else structure, it would be:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how can i make this code work as a toggle?

    thanks bernie, that did the trick. one gold star for you.

+ 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] Code is crashing, how can I make this work?
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 01-08-2016, 01:28 AM
  2. Make the below code work faster!!!
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 06:13 AM
  3. Replies: 1
    Last Post: 08-14-2013, 12:01 PM
  4. Replies: 5
    Last Post: 08-01-2013, 04:30 AM
  5. how to make code work
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2012, 06:22 AM
  6. *Add-In Help* Need help to make code into Add-In - List work
    By torontoguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2011, 03:25 AM
  7. Toggle Calc Button - how to make it work OK at startup
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2005, 04:05 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