+ Reply to Thread
Results 1 to 3 of 3

Toggle Code to format-unformat range of cells

  1. #1
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    Red face Toggle Code to format-unformat range of cells

    Hi All,

    I am trying to combine the 2 macro strings below.
    This is to change the font colour in a range of cells so as to hide the inputs and then unhide them when toggle button is unclicked.

    Any recommendations on a shorter line of code would be much appreciated.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This should do it
    Please Login or Register  to view this content.
    I was getting errors trying to set the .ColorIndex to xlNone, so I used 2 (white).

    If there were more properties to be toggled, an If Else EndIf would be a good way to go.
    Last edited by mikerickson; 02-09-2008 at 01:39 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    Thumbs up Awesome

    Hi Mike,

    That works a treat.

    Thanks so much for your help.

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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