Date picker in user form for Excel 🗓️
HTML-код
- Опубликовано: 23 июл 2024
- Download & learn how to create a date picker inside of a user form without using other active x or common controls, all VBA!
0:00 👋 Intro
0:21 🗓️ How to use it
0:46 🔨 Form breakdown
1:18 ➡️ Stepping through the code
2:53 💃 Dance time
⬇️ Download it here:
samradapps.com/datepickerinform
📅 See how to build the entire date picker here:
• Date picker for Excel ...
📈 Like Stonks? Check out this spreadsheet:
• Modern stock tracking ...
Humanity is grateful to you. Great job!
Quite Impressive. I am using both the cell and form versions. Just had to change the textbox name and the top postion of the frame and it works perfectly. Thanks so much. Very easy to use.
Glad to see you on RUclips, and looking forward to working my long-time favorite Date Picker into my next form. Meanwhile, I'm hoping you have a clever idea for disabling / re-enabling your date picker when running other VBA. Much appreciated, if so!
To be clear, I'm referring to Date Picker Classic -- samradapps_datepicker.xlam
this is awesome - thank you for sharing!
Thank you so much bro you made my day 💕💕
Great program, just what I was looking for thank you so much. Could you tell me where you would change the year format from yyyy to yy
Sir I have downloaded you Date Picker the very first day you launched on your web, may 2-3 years back, ever since then I was expecting you will be starting some tutorial videos, certainly helpful, thank you so much for all this great work.
Thank you TheStephens for your longtime support and kind words!! 🥰
@@radsheets sir very helpful i have not used any date picker other than users. ⭐⭐⭐⭐⭐
very, very nice solution ... excellent example to solve this datepicker problem👍👍
Thanks 👍
Some great content here
thank you! 🥰
Hi Rad Sheets, thanks a lot for this nice piece of code 👍
maybe a silly question, but how did you manage to get the 'Left' arrow (btnLastMonth) and 'Right' arrow (btnNextMonth) in the labels caption ?
On the form I do see the arrows, whereas in the caption property I see 2 question marks '??' (and the font type is 'Tahoma').
Hey Nico! Thanks for the nice words! Not a silly question! I’m trying to remember, I’m on mobile right now so once I’m back I’ll double check, but I believe I used alt codes for them, if you search for ascii arrows you’ll get website like this which you can c/p from : www.alt-codes.net/arrow_alt_codes.php … 99% sure I did that, 1% chance I used a windows emoji. :-) I’ll check once I can get to my desktop 😊
@@radsheets thank you for your swift (and efficient 🙂) reply.
I successfuly used your tip 👌
Awesome! I’m almost back from a trip so didn’t get a chance to check yet, but glad you got it working!
Geat. Would be nice to have an option to choose starting day of the week (e.g. Monday in Europe). or overtake the setting of operating system - like the names of the days and months.
Hi @SvandaPetr, You need to change the following line in the module 'dp_core' in the sub populateWeekdayNames().
Original for Sunday:
datepickerform.Controls("dayofweek" & i).Caption = VBA.WeekdayName(i, True, vbSunday)
New for Monday:
datepickerform.Controls("dayofweek" & i).Caption = VBA.WeekdayName(i, True, vbMonday)
##########
Also change the following line in the module 'dp_core' in the sub populateDatePickerDays().
After the comment line:
'get the Day of the week for the start
Orginal for Sunday:
iStartOfMonthDay = VBA.Weekday(the_startOfMonth, vbSunday)
New for Monday:
iStartOfMonthDay = VBA.Weekday(the_startOfMonth, vbMonday)
##########
The following still needs to be changed:
In the form 'datepickerform' in the procedure - 'Private Sub UserForm_Initialize()'
After the comment line
'set the current date and time
Orginal for Sunday:
todayButton.Caption = VBA.WeekdayName(VBA.Weekday(VBA.Date, vbSunday)) & ", " _
& VBA.MonthName(VBA.Month(VBA.Date)) & " " _
& VBA.day(VBA.Date) & ", " _
& VBA.Year(VBA.Date)
timeButton.Caption = VBA.Time
New for Monday:
todayButton.Caption = VBA.WeekdayName(VBA.Weekday(VBA.Date, vbMonday)) & ", " _
& VBA.MonthName(VBA.Month(VBA.Date)) & " " _
& VBA.day(VBA.Date) & ", " _
& VBA.Year(VBA.Date)
timeButton.Caption = VBA.Time
##########
I have tested and used it, it works great!
Wonderfull tool. Have been using this extensively. How can I put in an error handler to show "This cell is protected" and exit sub without changing cell
Updated the downloads to error with cell protection! Thanks for the feedback Francois!
Hi man, I'm having troubles using your date picker in excel I wonder if you can help me
Hey man I'm having issues using your date picker I really like it but it's not working on my workbook, wondering if you could help
How's ??? Question mark as caption in command button tuns it as calendar icon ????
Time 0:22 I keep getting a Extra Excel Sheet. - SHOW FORM. open up everytime & when I close my Sheet this Sheet still remains & have close it :(
How do I disable it
PLEASE HELP
hi ,,,, can this code be converted into a module with the same being called in a userform . could you pls share the Bas file for the module ?
Yes, see this video and download link: ruclips.net/video/pbalCb07ECw/видео.html
Dear RadSheets, everything works great, except when I click on the month or year selection, the "variable is not defined" error appears. After that, Excel restarts itself. How to fix it? What am I doing wrong? Excel 365 64bit. Thank you!
Hey Oleg! Have you downloaded it recently? I've got an update yesterday evening that should fix that problem!
@@radsheets Thank you! Yes, I used the version dated 10/22/2022. Today I downloaded the latest version from 10/27/2022 and now everything works fine, no errors!
@@radsheets How can I download the most updated version?
Sir i have downloaded your file, but when I oppen the excel file in other computer it gets icon error. There are any ways to remove the icon bmp and use something like a standard form just like in the video?
How to display /call it from userform?
Hey Lazy Reviews Support! This example is built into the form, so you can either start with that example form, or copy the calendar control and code to your form.
@@radsheets thanks for your response.. 😊 Not sure where to start 😔... I am no expert, just a beginner 😰...
Some guidance may be helpful
Hey! To start: If you have an existing form, I’d copy all the code about the calendar from the example into it, and then select the calendar bits from the example and copy it into your form too. Then the code that shows/hide the calendar. This is a good idea for another example video, so I’ll put it into the queue to do soon!
@@radsheets Thank you very much 😁