Make Dtpicker and combobox the same date

Excelnewbie001

Board Regular
Joined
Jan 25, 2017
Messages
79
Need some help from the excel gurus. How would I get that I get my Combobox2 and DTPicker3 have the same date with otherwords if I select the date in the combobox make it automatically select the date on the Datepicker DTPicker3

I tried this but it doesnt work

Code:
DTPicker3.Value =Combobox2.Value

My format on my date and my Combobox are the same in this format 17/11/16 -YY/MM/DD. Should I set this on the form initialize or on the DTPicker change ?

Thank you for any help .....
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Which version of Excel are you using and how did you create the datepicker?
 
Upvote 0
Your code as written should work. I would put it in the Combobox2_Change event.

I also thought so I am getting runtime error 380 ......my date in my combo box display a serial and not a date and I think thats my problem -help please 43023
 
Last edited:
Upvote 0
Ahhh....this is contrary to your first post. Try this:

Code:
DTPicker3.Value = Format(ComboBox2.Value, "yy/mm/dd")


This changes to the datepicker date....perfectly but I am thinking I have another problem if I select the combobox it displays dates correctly but when I am choosing 1 day...then the day changes to a serial number MrIfOnly

Thanks for your help
 
Last edited:
Upvote 0
Is combobox2 a list of dates? How is that combobox populated?

I think this might be easier if you can upload your file to a file sharing site and post the link here so I can take a look.

If that's not doable then please post the code that shows how you populate combobox2.
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,308
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top