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 ...

Комментарии • 38

  • @medice-curateipsum
    @medice-curateipsum 2 месяца назад

    Humanity is grateful to you. Great job!

  • @dms9275
    @dms9275 2 месяца назад +1

    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.

  • @djunabug
    @djunabug Год назад

    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!

    • @djunabug
      @djunabug Год назад

      To be clear, I'm referring to Date Picker Classic -- samradapps_datepicker.xlam

  • @jeffreyfischer2157
    @jeffreyfischer2157 8 месяцев назад

    this is awesome - thank you for sharing!

  • @mohdikram8303
    @mohdikram8303 2 года назад +2

    Thank you so much bro you made my day 💕💕

  • @marilynwaller411
    @marilynwaller411 Год назад

    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

  • @TheSTEPHEN009
    @TheSTEPHEN009 Год назад +1

    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.

    • @radsheets
      @radsheets  Год назад +1

      Thank you TheStephens for your longtime support and kind words!! 🥰

    • @TheSTEPHEN009
      @TheSTEPHEN009 Год назад

      @@radsheets sir very helpful i have not used any date picker other than users. ⭐⭐⭐⭐⭐

  • @SwissMarkus
    @SwissMarkus Год назад

    very, very nice solution ... excellent example to solve this datepicker problem👍👍

  • @JamesGettingFit
    @JamesGettingFit Год назад +1

    Some great content here

  • @nicor1501
    @nicor1501 Год назад +1

    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').

    • @radsheets
      @radsheets  Год назад

      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 😊

    • @nicor1501
      @nicor1501 Год назад +1

      @@radsheets thank you for your swift (and efficient 🙂) reply.
      I successfuly used your tip 👌

    • @radsheets
      @radsheets  Год назад

      Awesome! I’m almost back from a trip so didn’t get a chance to check yet, but glad you got it working!

  • @SvandaPetr
    @SvandaPetr Год назад

    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.

    • @bmbinder
      @bmbinder 24 дня назад

      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!

  • @francoismarsau6412
    @francoismarsau6412 Год назад +1

    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

    • @radsheets
      @radsheets  Год назад +1

      Updated the downloads to error with cell protection! Thanks for the feedback Francois!

  • @user-oy3gg1ul4q
    @user-oy3gg1ul4q 8 месяцев назад

    Hi man, I'm having troubles using your date picker in excel I wonder if you can help me

  • @Awannabeee
    @Awannabeee 8 месяцев назад

    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

  • @TheAjayiscool
    @TheAjayiscool Год назад

    How's ??? Question mark as caption in command button tuns it as calendar icon ????

  • @iZacq
    @iZacq 2 месяца назад

    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

  • @sallu21m
    @sallu21m Год назад

    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 ?

    • @radsheets
      @radsheets  Год назад

      Yes, see this video and download link: ruclips.net/video/pbalCb07ECw/видео.html

  • @Olligator88
    @Olligator88 Год назад

    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!

    • @radsheets
      @radsheets  Год назад

      Hey Oleg! Have you downloaded it recently? I've got an update yesterday evening that should fix that problem!

    • @Olligator88
      @Olligator88 Год назад

      @@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!

    • @lamorte33
      @lamorte33 Год назад

      @@radsheets How can I download the most updated version?

  • @nelsonstropa8352
    @nelsonstropa8352 Год назад

    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?

  • @lazyreviewssupport9811
    @lazyreviewssupport9811 Год назад +2

    How to display /call it from userform?

    • @radsheets
      @radsheets  Год назад +1

      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.

    • @lazyreviewssupport9811
      @lazyreviewssupport9811 Год назад +2

      @@radsheets thanks for your response.. 😊 Not sure where to start 😔... I am no expert, just a beginner 😰...
      Some guidance may be helpful

    • @radsheets
      @radsheets  Год назад +1

      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!

    • @lazyreviewssupport9811
      @lazyreviewssupport9811 Год назад +1

      @@radsheets Thank you very much 😁