Consulting

Results 1 to 3 of 3

Thread: PLEASE HELP ME WITH MONTHVIEW

  1. #1

    Question PLEASE HELP ME WITH MONTHVIEW

    Hi,
    Is it possible to bold the selected days in monthview based on a range in a sheet?
    Example:
    test.jpg
    So for this one, upon opening userform, the monthview must bold the days Aug30, Aug31, Sep1 and Oct31.
    Please help me figure out how to do this if it's possible, give me some examples coz this is my first time to use monthview
    Thank you very much masters

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    try using this (adjusted for the name of the control and the location of the range of dates) in the userform's code module:

    Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)
    For Each cll In Range("B2:B8")
    If cll.Value >= StartDate And cll.Value <= StartDate + Count Then
    State(cll.Value - StartDate) = True
    End If
    Next cll
    End Sub


    in code tags too (can't highlight bits with colour within code tags):
    Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)
    For Each cll In Range("B2:B8")
      If cll.Value >= StartDate And cll.Value <= StartDate + Count Then
        State(cll.Value - StartDate) = True
      End If
    Next cll
    End Sub
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    thank you so much sir!...really appreciated it

Tags for this Thread

Posting Permissions

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