• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fully Customizable VBA Date Picker

Status
Not open for further replies.

Hi macdonaldj. As others have mentioned, the date picker isn't set up to be embedded on another user form, but it can be accomplished with a bit of tweaking. The entire date picker is contained within a frame control, so you should be able to place that frame within a larger user form to achieve an embedded calendar control. You will also need to modify the function that sets and returns the selected value from the date picker, to prevent it from unloading the form.

I've created an example in the past of an embedded calendar control as a proof of concept. Hopefully it can get you pointed in the right direction. A link to the example is pasted below.

https://drive.google.com/open?id=0B60jq7LkOEFKaGlBS3RDeFc2NWM
 
I recently created a customizable, VBA-based date picker, and thought it might be of use to someone else. I know there are already a lot of custom date pickers out there to overcome the difficulties of using Microsoft's MonthView control. But I wanted one that could be customized to match the look and feel of whatever project it is being used in. I was never able to find one that could do this without significant code re-write.

You can click here to download the custom date picker I came up with. Below are some screenshots of the form in action.

Just want to say thank you so much.
 
Hi,
Read this as well. You can use date picker for Excel 32 bit (2010~2016), but not for 64 bit Excel.
https://www.ablebits.com/office-addins-blog/2016/10/12/insert-calendar-excel-datepicker-template/
I had to dig deep into my memory, but the girl and guys from The Frankens team*developed a calendar control for all office versions, including 64 bit.
https://sites.google.com/site/e90e50/calendar-control-class.
They updated it in 2017.

* Roberto Mensa, one of the three members, has a user account over here, but seems he never posted anything. What a pity...
 
Dear Sir,

Thank you indeed for sharing such a helpful subroutine for calendar.
Actually I was looking to enter a date on the selected cell except mentioning A SPECIFIC CELLS
Could you please help me out with that or any specific change in subroutine to execute the same.

Thanks
 
you are truly amazing :)
had to add application.Left to position it right when working with multiple monitors.

Truly amazing.. THANK YOU

>>> use code - tags <<<
Code:
    If PositionTop <> -5 And PositionLeft <> -5 Then
        Me.StartUpPosition = 0
        Me.Top = PositionTop
        Me.Left = PositionLeft
    Else
        Me.StartUpPosition = 1
      
        Me.StartUpPosition = 0
        Me.Top = ActiveCell.Top + ActiveCell.Height + Me.Height
        Me.Left = Application.Left + ActiveCell.Offset(0, 1).Left
      
    End If
 
Last edited by a moderator:
Hi,
I am using this calendar control. Its being working absolutely fine in the subroutine of user form. However, at one of textboxes, i want calendar to display in month view with default value of previous month and year. I am sure there must be a way out to display the calendar form in month view and return the value to text box in "mmm-yyyy" format. I have tried a few tricks like me.textbox1.value = format(calendarform.GetDate,"mmm-yyyy") but it didn't work.
Also, the position of calendar control is required to beside to respective textbox instead appearing in the middle of the form.

Any hopes to get this resolved.
 
Excelente!!! Yo vivo en México y no soy programador, me podrías ayudar para cambiar el formato de la fecha a dd/mm/aaaa? gracias
 
Status
Not open for further replies.
Back
Top