PDA

View Full Version : [SOLVED] PLEASE HELP ME WITH MONTHVIEW



jejeserafico
09-10-2014, 07:04 AM
Hi,
Is it possible to bold the selected days in monthview based on a range in a sheet?
Example:
12253
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 :crying:
Thank you very much masters :bow:

p45cal
09-10-2014, 10:48 AM
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

jejeserafico
09-11-2014, 08:36 AM
thank you so much sir!...really appreciated it :clap: :friends: :hi: