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

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 75

  • @OmerOmerBenOmer
    @OmerOmerBenOmer 10 ปีที่แล้ว +1

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

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  9 ปีที่แล้ว

      Muftah Omer Thanks for your appreciation. I try really hard to make it simple for others.
      Dan

  • @krn14242
    @krn14242 11 ปีที่แล้ว +1

    Cool, I didn't have that tool on my version and had to download and register it. Was a little bit of a pain, but I now have the date picker. Thanks Dan.

  • @shlerTHEnumbas
    @shlerTHEnumbas 11 ปีที่แล้ว +9

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

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว +5

    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

    • @carlosferreira7747
      @carlosferreira7747 8 ปีที่แล้ว +1

      I want to wish the same to you. And may God continue to bless your family.

  • @Ocosmas
    @Ocosmas 6 ปีที่แล้ว +1

    Hello, Thank you for your inspirational excel video. I have implemented your date picker on my work. I have some compatibility issues wondering if you can give me an idea on how to solve it. My excel file with the datepicker is located on a central server where every on the server can access it. The datepicker do not open another Computer with the same version of excel as in my computer (where the datepicker form was created.) Any idea as in what is wrong here?

  • @danmarked1790
    @danmarked1790 6 ปีที่แล้ว +2

    Hi, I need help.There is no Microsoft Month View Control on my Excel 2007. Is there any way to add it on additional Controls?

  • @uniQue_XL
    @uniQue_XL 11 ปีที่แล้ว

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

  • @brishnafarahi4486
    @brishnafarahi4486 8 ปีที่แล้ว +1

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

  • @scottmarshburn5143
    @scottmarshburn5143 11 ปีที่แล้ว +1

    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?
    Thanks
    Scott

  • @sunanjundaarsyi8666
    @sunanjundaarsyi8666 9 ปีที่แล้ว +1

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

  • @MohanKumar-wg5bv
    @MohanKumar-wg5bv 4 ปีที่แล้ว

    How do you position the popup calender next to textbox and position should not change even after you scroll

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

    Dear MrTexag95,
    If i understand correctly, enddate should be today's date by default? IF so, just put something on the Userform_Initialize script that says me.tbEndDate= Date
    Because "Date" equals todays date, its a built in system variable.
    2. Submit button, add a click event.
    2a. in the code for click event, put something along the lines of
    if stDate> endDate then
    msgbox "that's a no-no"
    exit sub
    end if
    range("a1") = stDate
    range("a2")=endDate

  • @PemimpinRaja
    @PemimpinRaja 11 ปีที่แล้ว

    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?

  • @danjzunitch
    @danjzunitch 10 ปีที่แล้ว

    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!

  • @neftalibautista5513
    @neftalibautista5513 6 ปีที่แล้ว

    I can't seem to find those labels tbStDate, it would not even show hidden. Any Suggestions?

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

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

  • @pawekrawczyk351
    @pawekrawczyk351 4 ปีที่แล้ว

    Hello,
    Unfortunately the inserted date is not in the date format. Can this be changed immediately in the Vba code?

  • @kaaa3485
    @kaaa3485 5 ปีที่แล้ว

    Great Video!!!. I have many ranges in a form. i want to color the cell to show that are required. if the cell has data, no color but if the cell is blank, color the cell. Also, I want to format a number to a date (like access)? if I enter a number 121519, it will give me 12/15/19 or If I enter 12/15/19 it will give me the same things.. Thanks in advance.

  • @Gaminiheraliyawala
    @Gaminiheraliyawala 9 ปีที่แล้ว

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

  • @Monduras
    @Monduras 9 ปีที่แล้ว

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

  • @adiltheprodigy8235
    @adiltheprodigy8235 6 ปีที่แล้ว

    Good, and how to show rows in listview between two dates?

  • @oliverliu1126
    @oliverliu1126 3 ปีที่แล้ว

    Hi! How to calculate and show the no.of day(s)?

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

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

  • @keithbrincat3931
    @keithbrincat3931 9 ปีที่แล้ว +1

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

    • @aantodanny
      @aantodanny 8 ปีที่แล้ว

      add me.fCal=Date in the userform initialize event..Cheers!

  • @ninastallworth1030
    @ninastallworth1030 10 ปีที่แล้ว

    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!

    • @danstrong5354
      @danstrong5354 10 ปีที่แล้ว

      Dear nina, if you run a search on my channel, you'll see kevin date picker that is extremely customizable. If you can't find it, I'll help but I'm at work currently. Dan

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  10 ปีที่แล้ว

      Here's the video that should help a lot, Nina Stallworth : Kevin Carter's Date Picker - Download Now FREE
      Yours,
      Dan

    • @ninastallworth1030
      @ninastallworth1030 10 ปีที่แล้ว

      Thank you so much for responding, your suggestion was quite helpful.

    • @danstrong5354
      @danstrong5354 10 ปีที่แล้ว

      Awesome so glad that helped!

  • @abdulhayee5902
    @abdulhayee5902 2 ปีที่แล้ว

    HI. I want to add calendar too in my vba forum but I didn't find date picker in excel 2016.
    I am using excel 2016 64-bit version and also windows10 64-bit version
    I downloaded the mscomct2.ocx file too and register it but still unable to add this date picker. any simple solution for adding calendar to my forum

  • @Godfathergameing01
    @Godfathergameing01 ปีที่แล้ว

    How to add shapes option in toolbox

  • @carlosferreira7747
    @carlosferreira7747 8 ปีที่แล้ว

    Dear Sr. , thank you very much for the classes.
    I need the following help:
    I want to use DTPicker in a form.
    Example:
    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.

  • @jaysolanki8366
    @jaysolanki8366 4 ปีที่แล้ว

    Thanks for sharing your precious knowledge and time
    I have a situation where i want to loop over 10 date pickers in a particular frame
    I have written code as
    Dim ctl As MSComCtl2.DTPicker
    for each ctl in frame.controls ' This code gives error at this point
    if ctl.value ="" then do something
    next ctl
    If someone can help please...

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  4 ปีที่แล้ว

      I haven't tried this but you may try
      if ctl.value = vbNull then
      Thanks
      Dan

    • @jaysolanki8366
      @jaysolanki8366 4 ปีที่แล้ว

      @@ExcelVbaIsFun Actually it's not looking date picker as control.
      I've written code as:
      For each CTL in frame.controls
      If CTL.value=null then do something
      End if
      Next ctl

  • @matthewdpeterson1738
    @matthewdpeterson1738 8 ปีที่แล้ว

    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.

  • @DanNightingale
    @DanNightingale 8 ปีที่แล้ว

    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?

  • @m66dragon
    @m66dragon 8 ปีที่แล้ว

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

  • @denisrithaphorn7142
    @denisrithaphorn7142 8 ปีที่แล้ว

    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? (-:

  • @stefanbatory2984
    @stefanbatory2984 6 ปีที่แล้ว

    Great! And as you sad: created by great people from Microsoft :-)

  • @binodthakur315
    @binodthakur315 5 ปีที่แล้ว

    Does it work in 64 bit office/Windows???

  • @benabdou26
    @benabdou26 11 หลายเดือนก่อน

    أين أجد رابط تحميل الملف أو نص الكود

  • @HarishKumar-ze8uc
    @HarishKumar-ze8uc 11 ปีที่แล้ว

    I don't have Month view option in my Excel 2010. What do I do?

  • @GokulShravan
    @GokulShravan 5 ปีที่แล้ว

    How to set default getdate in page load ?

  • @rubinator2000able
    @rubinator2000able 4 ปีที่แล้ว +1

    its realy good what you did but the sequense of how how you explain it gives me and headache

    • @Mark_Lacey
      @Mark_Lacey 4 ปีที่แล้ว

      I thought it was just me LOL

  • @waxfalcon
    @waxfalcon 2 ปีที่แล้ว

    Not working on Excel 2019 64 bits :-(

  • @yosef-yosef9414
    @yosef-yosef9414 ปีที่แล้ว

    Hi .. You did not teach how to create the form Cal in this video

  • @CSenPowerBI
    @CSenPowerBI 11 ปีที่แล้ว

    How can i see the codding

  • @عبدالرضيراجح
    @عبدالرضيراجح 6 ปีที่แล้ว

    شكرا على البرنامج الرائع

  • @sunanjundaarsyi8666
    @sunanjundaarsyi8666 9 ปีที่แล้ว

    thats preety cool n i need this

  • @JohnNewtonupdates
    @JohnNewtonupdates 11 ปีที่แล้ว

    Dan, DropBox link ends in a 404 page - bummer!

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  11 ปีที่แล้ว

      fixed it. It had the word "Interact" as part of the url, though the word was meant for the next line down. Thanks, dan

    • @JohnNewtonupdates
      @JohnNewtonupdates 11 ปีที่แล้ว

      ExcelVbaIsFun
      Thks Dan - now I'm missing a file. I guess its the MS date object

  • @photogpphotogp7468
    @photogpphotogp7468 3 ปีที่แล้ว

    Is this over?

  • @uniQue_XL
    @uniQue_XL 11 ปีที่แล้ว

    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 TH-cam did not develop it yet....ha? :-))

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

    TH-cam always screws up the line spacing, sorry that looked like crap.
    Dan

  • @jhanaksahu3000
    @jhanaksahu3000 4 ปีที่แล้ว

    how to change date time picker values + 1 year from datetimepicker1

  • @carlomontinaro2373
    @carlomontinaro2373 6 ปีที่แล้ว

    Hi, I changed the date format to European and also set the start value from Today.
    However, when the user clicks on a passed date, the format on the textBox is the US one.... anyone help?
    Private Sub tbStDate_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    tbStDate = Format(tbStDate, "dd/mm/yyyy")
    End Sub
    Private Sub UserForm_Initialize()
    fCal.Value = Date
    End Sub

  • @claudinedistrito8435
    @claudinedistrito8435 4 ปีที่แล้ว

    the code is not working.

  • @FamilyLifeComC
    @FamilyLifeComC 7 ปีที่แล้ว +1

    thanks

  • @PimLansingerland
    @PimLansingerland 9 ปีที่แล้ว

    @Gamini Heraliyawala
    stackoverflow.com/questions/13409653/how-to-add-date-picker-to-vba-userform
    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:\Windows\system32" to "C:\Windows\sysWOW64"
    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:\windows\sysWOW64\MSCOMCT2.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

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

    o crap! Well, I wonder how I got it? I don't remember doing that. Hmmm. Thanks krn!

  • @HichemComputer
    @HichemComputer 2 ปีที่แล้ว

    chapeau

  • @Belive_in_Jezus_Christ
    @Belive_in_Jezus_Christ 3 หลายเดือนก่อน

    I'm sorry but I didn't make it because you don't show the names of lbl in cal?! I did that and it gives me endless errors! Why don't you share the file so we can learn, because it's so difficult, and not all things are shown apparently?!

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 ปีที่แล้ว

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

  • @AliyaKhan-vt3in
    @AliyaKhan-vt3in 7 ปีที่แล้ว

    Hindi me