+ Reply to Thread
Results 1 to 6 of 6

Creating Calendars

  1. #1
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Creating Calendars

    Searching the web for a VBA solution for creating a calendar, I found one on a Microsoft site (http://support.microsoft.com/kb/150774).

    Their solution has a very laborious way to place the numbers into the calendar grid.

    Here is my simpler solution.
    Please Login or Register  to view this content.
    Microsoft's code:
    Please Login or Register  to view this content.
    Last edited by dangelor; 12-14-2011 at 12:12 AM. Reason: repair code display

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Creating Calendars

    According to the ISO system, december 2011:

    Please Login or Register  to view this content.
    Last edited by snb; 12-15-2011 at 04:19 AM.



  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Creating Calendars

    snb,
    Your code places a date in the cells, not the day number, and fills every cell. My code (and Microsoft's) will only populate those cells that correspond to the actual days of the current month with the day number.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Creating Calendars

    I don't see a question in the original post. If you are sharing your updated code (which I thank you for), please add an example workbook so we can see the results. Also this thread is probably better for the Water Cooler rather here. You can PM one of the moderators to move it.

    Hope this helps.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Creating Calendars

    As suggested, attached is a simple calendar using code. Change the selections in the drop down cells to create calendar.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Creating Calendars

    in the attachment:
    - the use of 2 validationlists (see macro snb how they are being attributed)
    - the use of a worksheetevent
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1