Excel VBA USERFORMS #25 Date Picker Calendar revealed! Loop through Userforms and Controls Example

Video ready, click here to close ×

**Limited Offer** Learn to Make Excel Do Your Work For You with The Ultimate Excel Programmer Course – Get the Full 9+ Hour Premium Course for 75% off using coupon code: https://www.udemy.com/ultimate-excel-programmer/?couponCode=2016YOUTUBE75 Click Now to Order and get Lifetime Access to Course, Workbooks, Updates and Support!
Create Your Own Barcode Lookup System Using Excel VBA. Learn to Make Your Own Barcode Labels the Easy way and have fun with Barcode Scanners to Automate your Workflow! In this project-driven Course, you’ll learn to Build your own Custom Inventory System with Step-By-Step video instructions. This goes in depth into some advanced Userform strategies that you can use for your other projects to come. A great weekend study! YouTube Subscibers only pay one forth! Get your 75% off Coupon here: https://www.udemy.com/barcodes-excelvba/?couponCode=2016YOUTUBE75
Too busy to Learn Piano? Use my Secrets and Play Your Favorite Songs Today! Did you know; You can learn 4 basic chords in about 5 minutes and instantly be able to play millions of songs. Seriously, check this course out. 75% off for my YouTube Friends! Click here: https://www.udemy.com/play-piano-by-ear-today-supercourse/?couponCode=2016YOUTUBE75

For Articles, Updates and to Contact me for Consulting or just to drop me a line, please visit http://www.ExcelVbaIsFun.com

Here is my link to download my FREE workbooks, past present and future: https://www.dropbox.com/sh/nwc5trm2xwlvvbh/XpGTrmKVyQ

Excel Vba Basics http://www.youtube.com/watch?v=AIhKNNXzZLM&list=PLw8O1w0Hv2ztGjIkrW7suD6oNDaOk3vbR&index=1
Tips N Tricks https://www.youtube.com/playlist?list=PLw8O1w0Hv2zsPU-k2vPZ_6brD5Gk1sVy_
Userforms https://www.youtube.com/playlist?list=PLw8O1w0Hv2zvnLFyiMrihcaOqA0sT0X2U
Sample Excel Programs https://www.youtube.com/playlist?list=PLw8O1w0Hv2zuP-BE7tV1UjWa0ZexZqY89
Events Series…



  • Dear Sr. , thank you very much for the classes.

    I need the following help:

    I want to use DTPicker in a form.


    Final Date (When clicking the calendar showUp and, letting me choose the date) minus (-)
    Initial Date (Follows the same procedure above).

    The answer I want to showup at Label Caption.
    thank you so much.

  • I have a userform with hundreds of labels I am using on a map for cubical locations.  I want to be able to type in the cubical name and have the label flash indicating where the cubical is on the map.  I am close, but I can't figure out how to have the userform find the label I want.  Is this possible?  I have one userform that I have done a worksheetfunction.match to bring up the data I've entered.  Then I have a command button that takes me to my map.  I want the map to come up and flash the label with the cube number I entered.  Any help would be appreciated.

  • I followed your steps to create a date picker and I couldn't get it to work. Can you help?

  • Re:should be able to format it whenever it changes. Maybe use a Before_Update event. . .

    Textbox1 = format(Textbox1, "dd/mm/yyyy")

    How and were? (-:

  • You alluded to the fact that you have a separate video on how to create an icon to click to show another userform.  Could you post the URL to that video?

  • Why not share your excel file with unlimited space on Docs.com! https://docs.com?ggytb

  • very useful Video , if we pick the Dates from These two textboxes and want to have the number of days in other TextBox what will be the code????????????

  • @Gamini Heraliyawala


    1. Close Excel
    2. Download MSCOMCT2.cab (it's a cabinet file which extracts into two useful files)
    3. Extract Both Files: the .inf file and the .ocx file
    4. Install: right-click the .inf file and hit "Install"
    5. Move .ocx file: Move from "C:Windowssystem32" to "C:WindowssysWOW64"
    6. Run CMD by opening the Start Menu -> Search -> "CMD.exe" | right-click the icon | Select "Run as administrator"
    7. Register Active-X File: Type "regsvr32 c:windowssysWOW64MSCOMCT2.ocx"
    8. Open Excel and Open VB Editor
    9. Activate Control: Tools->References and Select "Microsoft Windows Common Controls 2-6.0 (SP6)"
    10.Userform Controls: Select any userform in VB project by Tools->Additional Controls
    11.Select "Microsoft Monthview Control 6.0 (SP6)"
    Use 'DatePicker' control for VBA UserForm

  • Is it possible to change the defualt date to the current date?

  • Can somebody tell me how to get the calender control in the tool box? I don't find it in my additional tools

  • thats preety cool n i need this

  • do you have a link download microsoft month view?because i dont have,,so share with me,,,thank u

  • is there some way to late bind the datepicker? whenever i share this with users it doesn't seem to work (even after I set all of their references the same as mine).

  • I would like to thank you for all your help and advice on how to make excel easier to use.

  • Your videos are done quite well and very easy to understand–they have helped me immensely in learning VBA.  One question, do you have code that will allow me to leave a date picker value blank until a user selects a date?  Your suggestion(s) will be greatly appreciated!

  • Very cool. I did have a glitch I wanted to mention in case others run into this. I was using Option Explicit so I had add declarations for the uf and ctl loop counters. I assumed that "uf" would be type UserForm but when I did that I got an error. It turns out you need to declare uf as type Object, then it works fine. Thank you very much!

  • (For Windows 7 (x64) | MS Office 32-Bit)

    Option 1 | Check if ability already exists | 2 minutes

    Open VB Editor
    Tools -> Additional Controls
    Select "Microsoft Monthview Control 6.0 (SP6)" (if applicable)
    Use 'DatePicker' control for VBA Userform
    Option 2 | The "Monthview" Control doesn't currently exist | 5 minutes

    Close Excel
    Download MSCOMCT2.cab (it's a cabinet file which extracts into two useful files)
    Extract Both Files | the .inf file and the .ocx file
    Install | right-click the .inf file | hit "Install"
    Move .ocx file | Move from "C:Windowssystem32" to "C:WindowssysWOW64"
    Run CMD | Start Menu -> Search -> "CMD.exe" | right-click the icon | Select "Run as administrator"
    Register Active-X File | Type "regsvr32 c:windowssysWOW64MSCOMCT2.ocx"
    Open Excel | Open VB Editor
    Activate Control | Tools->References | Select "Microsoft Windows Common Controls 2-6.0 (SP6)"
    Userform Controls | Select any userform in VB project | Tools->Additional Controls
    Select "Microsoft Monthview Control 6.0 (SP6)"
    Use 'DatePicker' control for VBA UserForm

  • What if you don't have the month picker as an option?

  • hey dan, how do you change the formatting of the textbox to dd/mm/yyyy.

  • Merry Christmas everyone. I hope God blesses you richly this upcoming year. Remember, you ARE a success!! Believe it, be it! Blessings my friends!! Dan

  • Dan, DropBox link ends in a 404 page – bummer!

  • How can i see the codding

  • That's pretty ridiculously cool! Will have to check this out! thanks, dan

  • Hן Dan
    I have XL2013 and XL2007, in this case I've opened the 2007 version.
    If there was the possibility to add a screen pic….but YouTube did not develop it yet….ha? :-))

  • cool! Thanks the ExcelStudio! I can't find it, do you have 2013? I have 2010. blessings, Dan

  • Thanks a lot!
    There is much easier way >> You can take the 'Microsoft Date and Time Picker Control 6.0' that is doing all you showed with the VBA code, but, the this control has already in it all you did (meaning: pick up a date and put it on the Text Box. >> F.Y.Info
    By the way 2 , after you add the control you can right click it and modify it… add pic. etc'…

  • If I have a user form and workbook with this feature and .Would it still work on another computer that does not have This Month view control installed on it?

  • Thanx sir, its really helpful.. but if not burden you, do you have any idea how to move that red circle into our current date clicked?

  • You may search for it on microsoft's website, I'm not sure. Sorry Harish. Dan

Leave a Reply

Your email address will not be published. Required fields are marked *