Results 1 to 7 of 7
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CALENDAR PLANNING (2000 sr 1)

    Messaggio cancellato da sal21

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    I think I understand what you want. I can't seem to go thru your code:

    The variable System1 is not defined and I do not understand what the object "Extra.System" is. This program seems to be important for your code to run, could you provide a version that does the essentials without requiring this?

    Steve

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    Sal, don't take this too hard, but I think you are asking for too much now. The Lounge is intended to help people with specific questions, not to write software for them. You have received generous help from us, over and above what we normally do, but that can't go on indefinitely.

    Some days or weeks ago, I have written code for you, demonstrating how to loop through the cells of this workbook, or a previous version of it. You should use that code, and the other pieces of code we have written for you, to work out how to do what you want. If that is too difficult, you should get a commercial Excel developer, preferably one whose native language is Italian, to write it for you.

    If you have a short, specific question, you are welcome to ask it here, but please don't expect us to create complete solutions for you.

  4. #4
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    My dear after 4 day of strong work i have make this:

    www.gssitaly.com/my_calendar.zip

    1) wath is jour judment?

    2) Naturally i have a question for you;-)

    Is possible to jump during the colorize cells, the day Saturday Sunday (in effect there are to the default a holiday)?

    For example the record nr. 22712 (FANELLI AMALIA) i colorize from the macro the cell from G11 to J11 i would want to colorize only the range G11 and J11 the range H11 and I11 are Saturday and Sunday...

    This for all record thhat have a range with this rules...

    I hope to be clear...

    As usual tks in advance.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    The code works well, if a bit slow.

    I think the line lngRow = 6 near the beginning of the Calendar procedure should have 5 instead of 6, since the data begin in row 5, not in row 6.

    It is easiest to clear the coloring of the weekend days after first coloring the vacation periods. Add the following procedure to the module:

    Sub Cancella_Weekend()
    Dim lngCol As Long
    For lngCol = 6 To 189 'columns F to GG
    With Sheets("PRIMO_SEMESTRE")
    If Weekday(.Cells(4, lngCol), vbMonday) > 5 Then
    .Range(.Cells(5, lngCol), .Cells(15000, lngCol)).Interior.ColorIndex = xlNone
    End If
    End With
    With Sheets("SECONDO_SEMESTRE")
    If Weekday(.Cells(4, lngCol), vbMonday) > 5 Then
    .Range(.Cells(5, lngCol), .Cells(15000, lngCol)).Interior.ColorIndex = xlNone
    End If
    End With
    Next lngCol
    End Sub

    Insert the following line into the Calendar procedure near the end, immediately above the line Set rngDatesPrimo = Nothing:

    Call Cancella_Weekend

  6. #6
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    naturally, it WORK WANDERFULL!!!!!!!!!!!!!!!!!!!!

    Professional up-date:

    is possible to colorize entire column saturday in grey and sunday in another clear grey to the last useful record?

    Tks for judment... i have make this with your 99% instructions from the last post

    Remember: you (active.cells 1, 10) me (active.cells 0, 0)
    in this time is possible: me (active.cells 0, 1)
    ???

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CALENDAR PLANNING (2000 sr 1)

    1. You can replace xlNone in the Cancella_Weekend procedure by a number that corresponds to gray, for example 15 (light gray) or 16 (dark gray).
    2. If you only want to color the "used" range, replace 15000 by the row number of the last used row. You have seen in several examples how you can determine the last row in a column by using End(xlUp), so you should be able to work it out.

Posting Permissions

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