+ Reply to Thread
Results 1 to 2 of 2

Altering DatePicker to write to Textbox on userform

  1. #1
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    262

    Altering DatePicker to write to Textbox on userform

    Hello All!

    So this time I'm looking to alter already existing code (and I'll admit there is so much in the calendar module I thought looking to you would help keep my sanity).

    First, I have a userform I am going to have write to the sheet based on currentregion (this bit I am pretty certain I can achieve already with previous code I've used). But there are about 14ish textboxes in the userform that require a date.

    Rather than deal with the end user always entering the proper format, I went the way of a date picker. I found a calendar form and code online and incorporated it into my workbook.

    The short of it:

    1. I have already established that every time a user clicks one of the date textboxes, the datepicker opens up.

    2. Hitting okay on the datepicker writes the date 12/30/1899 into the textbox, which from reading the notes in the code, is the date written when there is an error.

    3. The date is written to a cell in the sheet in addition to the date in the textbox.


    What I'd like to do if possible:

    1. Have the date picker open exactly as it does now, when the textbox is clicked.

    2. Have the date selected write only to the textbox once the okay button is hit.

    3. (Optional) If the textbox already contains a date, have that date be selected as the datepicker opens.

    See attached file for work so far.

    Thank you all in advance,

    -LM
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    262

    Re: Altering DatePicker to write to Textbox on userform

    Hi Everyone,

    I contacted the original creator of the calendar and he replied in very short order with a solution. I'm attaching the testfile he sent me (and his original calendar) that illustrate the difference between what I had and what I ended up with.

    Thanks,
    Attached Files Attached Files

+ 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] how can i write a code to stop leaving blank textbox in userform
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2014, 02:44 AM
  2. UserForm + TextBox Read-Write + Button to refresh - 3 simple steps.
    By mariosmk555 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2014, 01:09 AM
  3. [SOLVED] Datepicker, textbox & cells date-format does not match for formula to work
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2014, 10:04 AM
  4. Replies: 4
    Last Post: 01-29-2014, 05:53 AM
  5. Replies: 33
    Last Post: 02-14-2013, 01:51 AM
  6. Userform textbox dous not write to the worksheet
    By Mieska in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2012, 12:56 PM
  7. possible to write email body in userform's textbox?
    By dan2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2010, 05:12 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