+ Reply to Thread
Results 1 to 9 of 9

Calendar with restricted dates to select

  1. #1
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Question Calendar with restricted dates to select

    Is there a way to have a calendar pop up when a particular cell is selected and only have Sunday dates as optional selections? Needs to be able to scroll by month.

    Thanks! You all have been sooo helpful!
    Last edited by bjohnsonac; 03-20-2009 at 11:10 AM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Calendar with restricted dates to select

    Hi, On your Toolbar Select, "View","Toolbars", "Control ToolBox", at the bottom of the menu , there is an icon (Looks like Hammer & Spanner) Icon Says "More Controls", Click this and Select Calendar from the list, Click sheet, Calendar Appears on sheet.

    Right click youy sheet, Select "View Code", VB Window appears.
    Paste Both the codes (in one) into the Window.
    Close Window
    When you click in sheet the Calendar should disappear and when you click cell "A1" it reappears.
    The calendar Code tells you, when you click a Weekday or the Weekend.
    You need to alter it to do what you want.
    Please Login or Register  to view this content.
    Regards Mick
    Last edited by MickG; 03-18-2009 at 01:22 PM.

  3. #3
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Re: Calendar with restricted dates to select

    Thanks Mick! A couple questions...
    1. Once they select a date, how do I ensure that cell gets populated with the date they select?
    2. Is there a way to create a "STOP" if they try to click past the date selection?
    3. The calendar shows up when I open the workbook, but not necessarily when I click on the specific cell "I4" - I need it to show up EVERYTIME they click on cell "I4" and force them to make a selection that is a Sunday date.

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Calendar with restricted dates to select

    Hi, Sorry I misread your Thread.
    This code will allow a Sunday Date to be selected which will be transferred, on selection to the Active cell.
    If any oher Days are selected you will get an error message.
    The Calendar will show when you click "I4", and disappear when you click "I1".
    Change these addresses to suit you.
    If the Calendar does not appear, Click "Alt + F11" to view the VB Editor window. On the Toolbar Click The "Green Triangle" to Ensure the Blue Suare to its left is Dark Blue. This is to ensure you are in "run mode".
    Exit the editer & try again.
    Please Login or Register  to view this content.
    Regards
    Mick

  5. #5
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Re: Calendar with restricted dates to select

    Mick, I got most of it working now thanks to you! The only thing I can't get to work is having the calendar disappear once the user clicks off cell $I$4....ideally, once they enter a date, I would like for the cursor to automaticlly move to cell $A$5 and have the calendar disappear, but if they return to cell $I$4 at any time the calendar should re-appear....

    Here is my current code:
    Please Login or Register  to view this content.
    Thanks again for all your help! This thing is almost done now and I can then move onto my next project

  6. #6
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Calendar with restricted dates to select

    Hi, Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  7. #7
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Re: Calendar with restricted dates to select

    That works to get the calendar to disappear, but then it doesnt re-appear again if the user clicks back on cell I4 again.... - I have attached the file if it will help. Also, the calendar doesn't show back up when you re-open the file.
    Attached Files Attached Files
    Last edited by bjohnsonac; 03-20-2009 at 10:48 AM. Reason: ATTACHIGN FILE

  8. #8
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Calendar with restricted dates to select

    Hi, Your Cell reference was "Merged Cells"
    Try the attached !!:-
    Regards Mick
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Thumbs up Re: Calendar with restricted dates to select

    Oh man! Thank you thank you thank you!!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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