Results 1 to 20 of 48

Thread: Solved: Calendar control not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quick update on this one. Today I released a new addin at work which makes use of this calendar, and it rocks! My machine is XL2003 on Windows XP, and the server that everyone else is using is Windows 2003 using XL97 SR-2.

    It worked flawlessly all the way around. Probably saved me a bunch of time fooling around with the ActiveX calendar controls.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  2. #2
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    268
    Location
    Revision 13 for your coding pleasure. This incorporates several bug fixes, particularly if you use dpModes 2 ,3, 4. dpModes 0, 1 are affected most when supplying default dates.

    Code Access:

    1. Transitioning to a userform + code module structure. Calling code now in 'YourCodeHere'. This code currently covers all possibilties, and is longer than would be necessary for most applications. For example, the simplest call would now be myDate = getUserDate() which would use dpMode 0 and all of the standard presets. This will allow users to keep the junk out of their own code, and also allows DatePick to directly reference the calling module ('CalendarModule') to help resolve any potential conflicts.

    Re-Enabled Features:

    1. dpMode = 3 now has MultiSelect re-enabled in the events ListBox. (This was previously disabled when the code was updated to use eventList comments.) This required code attached to ListBox1.Change() to detect, interpret, and record a history of selection changes in ListBox1 so that the comments could always be displayed for the most recent addition to the ListBox1 selection.

    Bug Fixes:

    1. Inability to scroll ListBox1 with dpMode = 3 and displayComments = False
    2. Subscript out of Range errors when using dpMode >1 and defaultDate not from current year.
    3. defaultDate is now set to zero if it is initialized with a year outside of the values of ComboBox2. This fixes several outstanding issues.
    4. Several formatting bugs that would appear if defaultDate differed from the current year.
    5. A few other minor issues with eventList and eventMatrix.

    Foundation changes:

    1. Recoding to allow future control over the allowable year range.
    2. Combining returnDate() and returnCodes()
    3. Recoding to allow future access to secondary features such as calendar size, 'Find Today' behavior, etc.

    Enjoy, BC.

    Edit: Code removed. Go to post #39.

  3. #3
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    268
    Location
    Revision 16:

    Code Access:

    1. Using the calendar is now split into two calls. A mandatory one to actually do the work, and an optional pre-call to set up some of the extended features. See the code in module 'YourCodeHere' for details.

    Extended Features:

    1. Last biggie feature. You can now supply a range of years in which to operate the calendar. For example, you can set it to 1960 through 1980 if you wish. See code in module 'YourCodeHere' for details. I'm particularly interested in any bugs associated with this rehash. This feature has priority over defaultDate. i.e., If defaultDate is not within the calendar range, it will be reset to zero.
    2. For kpuls. Optional date selection with 'Find Today'. See code in module 'YourCodeHere' for details.

    Bug Fixes:

    1. Fixed a new bug that prevented returning a date with dpMode <2.
    2. Assorted parameter bugs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •