+ Reply to Thread
Results 1 to 5 of 5

Squashed Calendar

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    15

    Squashed Calendar

    First off, thank you for taking the time to read this and offer your input.
    I am trying to create a squashed calendar (if there's an official name for it, let me know). Here's an example of what August 2012 would look like (sorry about using the code window, but that's the only way I can make it look right):
    Please Login or Register  to view this content.
    Basically, it wouldn't move down a row until the row above is completely filled. I'm starting with the calendar creator macro from the Microsoft website: http://support.microsoft.com/kb/150774. I removed all the fancy (and dare I say schmancy) formatting code and have it printing out a very basic looking calendar.
    I won't post the full code, but here is the section that prints out the days:

    Please Login or Register  to view this content.
    By strategic use of msgbox, I'm able to stop the code at the point it gets to the end of the row:

    Please Login or Register  to view this content.
    I've gotten so far as:

    Please Login or Register  to view this content.
    And that's where I get stuck. I've tried to use the active.cell to move the cell.row to cell.row-1, but I'm not familiar enough with VBA to do it. My guess is that I can use

    Please Login or Register  to view this content.
    to know when to move back down a row...but I just can't figure out how to move the active cell - or is it the cell range? - up to where I need it.

    If anyone can help me figure out what happend after "then," I'd really appreciate it.

    Thanks in advance,
    Dan

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Squashed Calendar

    Hi

    this assumes that you have your headings in the range A2:G2, starting with Sun in A2.

    Please Login or Register  to view this content.
    Hopefully that will get you going.

    rylo

  3. #3
    Registered User
    Join Date
    01-29-2012
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Squashed Calendar

    Hi Rylo -
    Thanks for your suggestion. I tried it out using 8/1/2012, and it still prints out as a normal calendar with the 5th starting out on Row 4 instead of Row 3 - so no squashy love from it )-:
    I've never seen the "evaluate" function before, so you did give me something new to research (-:

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Squashed Calendar

    Hi

    Sorry, completely misinterpreted what you were trying to achieve.

    Try this.

    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    01-29-2012
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Squashed Calendar

    That was the trick. Thank you very much!

+ 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