+ Reply to Thread
Results 1 to 3 of 3

IF date in cell is not a workday then hide checkbox

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    14

    IF date in cell is not a workday then hide checkbox

    What I'm looking for is code for if i enter a date into a cell and this date is either a saturday, sunday or a holiday then checkbox1 is hidden.

    Obviously the first part of this is ' Me.CheckBox1.Visible = IIf(Range("$F$6").Value = ' but i can't get the correct code for the last part.

    Thanks for any help.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: IF date in cell is not a workday then hide checkbox

    Hello there,

    Try this

    Please Login or Register  to view this content.
    1. Select the worksheet that contains the checkbox
    2. Right click on the worksheet's tab
    3. Select the View Code option
    4. In the space provided, copy and paste the above code I provided. Anything that appears in green is a comment I left to help you understand.
    5. Exit out of the Visual Basic Window
    6. Change the cell in F6, you should see the checkbox appear and disapear based on the criteria in the code.


    Please note: This code assumes that you have an ActiveX checkbox on your worksheet and it's name (different from caption) is Checkbox1.

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: IF date in cell is not a workday then hide checkbox

    Just tried it there mate and it doesn't work, doesnt seem to do anything

+ 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