Consulting

Results 1 to 4 of 4

Thread: Excel Userform DatePicker Default Format to be Blank

  1. #1
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location

    Excel Userform DatePicker Default Format to be Blank

    Before User select date, the date picker box must not show any date, i.e. format must be blank

    The initial form must look like the one below.

    Initial Image.jpg

    Once the date is selected with the drop down, the result must show normally, as below.

    Filled in Image.jpg

    I can initialise the form using a custom format of one space, but can't get it to change to normal when selecting a date from the drop down. It still shows it as blank.

    I'm sure it can be done, but just can't get it to work.

    Thank you for your time.

    Regards
    vanhunk
    Attached Files Attached Files

  2. #2
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location
    The initial view can be achieved by different methods, either by code in in the initialisation step, or using the properties box, I could however not get it to change back when a date is selected/picked from the drop down.

    Regards

  3. #3
    The DatePicker control is no longer available in recent versions and while it can be made to work it is probably best avoided. I would suggest using a VBA date picker, and rather like Trevor Eyre's implementation which I have added to your workbook - along with the code to implement it. I have set the start date for each control as today's date (when clicked) and the initial setting is a blank text box.
    Attached Files Attached Files
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  4. #4
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location
    Quote Originally Posted by gmayor View Post
    The DatePicker control is no longer available in recent versions and while it can be made to work it is probably best avoided. I would suggest using a VBA date picker, and rather like Trevor Eyre's implementation which I have added to your workbook - along with the code to implement it. I have set the start date for each control as today's date (when clicked) and the initial setting is a blank text box.
    Thank you so much gmayor, this is perfect and exactly what I was looking for.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •