A userform based Calender to COPY into your App!

  • Do you need a calendar control but don't want to use an OCX, DLL, or other type of third party controls due to issues when the app is distributed.


    But yet you still want to embed a calendar into your form. Then this is an answer that I've come up with.


    Now forgive me my Technical writting skills are just not that great so my instructions and comments may not be all that clear. Hopefully, you'll be VBA literate enough to overcome my deficiencies.



    To the forum moderators.
    I'm not sure if this is the place for this. But I don't have a web site for users to download from.


    Let me know of alternatives.



    ( Please see later post for updated version )
    ( Removing outdated attachment )

  • This is looking good, couple of thoughts


    The Month is only showing January? can't see where to tweak to show all months...


    Also, it would be a good feature of the Today button to show the date in the calendar, like August with 2nd highlighted. ...


    Thanks for sharing your work, it's very appreciated.


    Cheers

  • Hmmmm???


    Redownloaded to see if I up loaded wrong calendar. Not sure of the problem you're having it's working for me.


    The Today button does do exactly as you ask.



    If you could please step through the code and see if you can see where it's failing to load the months. This is my first attempt at trying to make something for other people to use. So please any help you can give would be appreciated.



    Regards,
    Barry Pettis

  • Hi to Barry in the US ...


    ...ah, that be the clue...after re-downloading, opening in 97, 2000 and 2002 ...then it hit me ...it's the Date format.


    Us quaint folk in the UK like dd/mm/yyyy or similar, so by changing the lines that refer to this (the awkward one, for me, was the Combo box, with the different lengths of month text), it works fine now.


    Please find a UK version attached, with comments to convert back.



    Thank you again, very helpful



    All the best

  • I like your app, an improvement on the MS supplied add-in and more useful.


    I needed a small calendar embedded in a sheet that could be easily linked to another sheet or perform a macro. The idea is for the user to click on a date and the action is performed. My first go is attached and although not sophisticated, seems to work and avoids calling up a form.


    Your comments appreciated.


    Marcel

  • When it rains it pours calenadars.


    It looks great. How about adding a month selector?


    Also a Squire_King found out in mine there needs to be an accomodation for different date formats. I'm not sure if yours will work with the UK date format the use.


    How about a Today button?


    How about when you right click it saves that date in one place for reading easy reading of selected date.


    Otherwise it looks totally cool.

  • Here is an update to the Calendar form that I've created. I'm hoping that I've addressed the different date settings.


    Please let me know if you find it useful.


    Thanks




    ( Please see later post for updated version )
    ( Removing outdated attachment )

  • Quote from iwrk4dedpr

    ...But I don't have a web site for users to download from.


    Let me know of alternatives.



    Nice app. If you want a website link, you could add it to the VBA D/L section of my website.

    [SIZE="1"]Sub All_Macros(Optional control As Variant)[/SIZE]

  • Toggle Calendar visibility


    Quote from iwrk4dedpr

    Here is an update to the Calendar form that I've created. I'm hoping that I've addressed the different date settings.


    Please let me know if you find it useful.


    Thanks


    I would like to try your calendar in one of my applications. I would like it to appear, when the user double clicks on a required cell, without having to "toggle calendar visibility". What portion of the code needs adjusting?


    Your calendar works on a system with any type of date format. That is European or American.

  • I didn't originally write this to be used in this method. However, I've made some adjustments and it should work for use from a worksheet.



    Please check out the newest version. It should show you how to do what you're asking.


    Let me know if my changes are successfull!!


    Regards,

  • In order to defeat the different date formats, at least UK/US formats, I had to use the DateSerial function and then display the selected date using the long date format MMM dd, yyyy. This allowed XL to be able to determine the correct month regardless of the international date settings.
    As far as correcting Phil's calendar I haven't look at his code.


    Regards and good luck,
    Barry

  • Update to Excel Based Calendar


    Hi


    There were a couple of requests made to improve my simple calendar. It now has a Today's Date click, Select a Month table and a Show and Hide button.


    Gops, not sure if this addressess your request, if not, please send a more detailed description.


    Thanks


    Marcel

  • Re: A userform based Calender to COPY into your App!


    Seems like everybody wants a calendar form to select a date. I know it's recreating the wheel but here's another calendar.


    To summarize the files attached.



    Calendar_01
    Was/Is meant to be used on a form. This is not a control which you can just simply place on your form. It's entirely VBA. Once it's placed on your form and it's code is also added to your project you should be able to use the calendar without issue.


    Calendar_02
    Was/Is meant to be used in the Worksheet envrironment. You set up event traps or controls that call the form and place the selected date into the desired data range.

  • Re: A userform based Calender to COPY into your App!


    Just to offer alternatives.


    The attached file is the latest version of the calendar that I originally built in Feb 2003. Many suggestions from this board were incorporated to make it what it is today.


    The latest functionality is when one selects a date that falls in the preceding or proceeding months the calendar changes to that month.


    Additionally, many of the international date issues were resolved.


    Best regards to all,


    Phil

  • Re: A userform based Calender to COPY into your App!



    Hi Phil:


    As you know I have been using your calendar version 9. Works well except when the system date setup is European. In that case all the months displyed are "January". Many of my users use American date format. However, there are a few who use European setting ( I am in Canada). In these rare cases, I have been advising them to type the date or change their system setting.


    I thouhgt you implied in your posting that this was resolved. I downloaded your version 10, but it still does not work (re: months) if the date format in the system is European.


    Also, when a date is picked the month and the year changes. For example, If today's date is March 3, 2005 and if I select the day "3", the year changes to 2003. Am I doing something wrong?


    The cell is formatted: yyyy-mmm-dd.


    Excellent calendar, however.


    Cheers
    Gops

  • Re: A userform based Calender to COPY into your App!


    Hi Gops,


    Someone had mentioned that the code revisions that were done some time ago had resolved the European date issue. I guess from this post that they have not.


    Maybe in the coming weeks I can look into that again and see if I can repair the problem.


    Does anyone out there know the code to read the regional date settings on a machine? With this I could adapt what I have and make it more universal.


    Another option would be to rewrite the code using the serial number date. Some work but doable.


    Best regards,


    Phil

  • Re: A userform based Calender to COPY into your App!


    Phil


    I have moved this post to the Showcase Forum - seem's more apprpriate.


    can you use this


    Code
    1. Application.International(xlCountrySetting)


    or

    Code
    1. Application.International(xlMetric)
  • Re: A userform based Calender to COPY into your App!



    I have imported your calendar_01. Its AWESOME! Any way to doubleclick in a text box and make the calendar work and then put that resulting date into that text box??


    Your help is greatly appreciated!!