+ Reply to Thread
Results 1 to 8 of 8

Pop up calendar to insert date in text box on user form

  1. #1
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Pop up calendar to insert date in text box on user form

    Hi,

    I have been looking around for ways to use a pop up calendar, but none of the ways I have found are specific to my needs.

    I am using user forms that contain many fields that are filled out and then entered into different columns of a spreadsheet.

    I currently have the user entering in the date manually with "mm/dd/yy" in the text box upon userform initialize to signal the desired format.

    Is there a way to create a pop up calendar so the user can select a certain date, and then that date be entered into the text box?

    I have attached my workbook
    the password, when prompted, is "MillSteel"
    I am using Excel 2010

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Pop up calendar to insert date in text box on user form

    He;llo emilyloz,

    I have created a popup calendar using a UserForm that will allow to select the object the date is output to. The default is the ActiveCell. I can it to your workbook if you like.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: Pop up calendar to insert date in text box on user form

    I'm not sure if active cell will work.

    Everything that I insert from the userform onto the spreadsheet is using row count.

    I could be mistaken though.
    have you looked at the workbook?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Pop up calendar to insert date in text box on user form

    Hello emilyloz,,

    The only dates I see are on the UserForm Entry tabs. The calendar I have will allow you to transfer the date selected to any control on the user form that has a Value property. TextBoxes have this property.

  5. #5
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: Pop up calendar to insert date in text box on user form

    okay that makes more sense.. could you attach it and send the workbook back?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Pop up calendar to insert date in text box on user form

    Hello emilyloz,

    Here is the updated workbook. The user can either type in the date or use the popup calendar. There is a button to the right of each text box to activate the popup calendar.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: Pop up calendar to insert date in text box on user form

    Hi that works great!

    you only added the userform and the subs to call it for each different displayin(textbox)?
    (I ask because I need to transfer it to the workbook actually being in use)

    Also,
    Is there a way to close the form upon clilcking a date? or I guess I could simply add a button to close the form?

  8. #8
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: Pop up calendar to insert date in text box on user form

    The original code wasn't closing the form after selecting a date, so Leith changed the class module to this:

    Please Login or Register  to view this content.
    Thanks so much for your help!

+ 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