Good afternoon,
I would love to mark the dates in my calendar form, which are listed in the excel cell.
My issue looks like in the image below...
So, in the calendar, which example comes from this thread is very good. However all, what I can do it is to click on the certain date and get the messagebox, that I've clicked on this date. I want to make some small alterations through connecting this calendar to the date cells, based in the C-column. This table is going to expand, so whatever the amount of these date-values I want to have them highlighted in this calendar. Basically how it could be like - the date linked to the value is highlighted in red color, and the on-click messagebox shows the concatenation of values from cell B and cell C instead of pure date.
Analytzing the advanced code, coming from the foregoing thread I found the msgbox section:
If CommandButtonEvents.Tag <> "" Then
MsgBox CommandButtonEvents.Tag
End If
it refers to the commandbuttons, what is written in the CalendarClass module.
Another piece of code comes from the frmETRCalendar (calendar Form) code:
Private Sub D3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer,
ByVal X As Single, ByVal Y As Single)
If X >= Day_Xmax Or X <= Day_Xmin Or Y <= Day_Ymin Or Y >= Day_Ymax Then
D3.BorderStyle = fmBorderStyleNone
Else
D3.BorderStyle = fmBorderStyleSingle
NoBorder 3, "D", 42
End If
End Sub
and possible solution here:
How to make match() work with date in excel vba?
So I would use the match option for the column, where all my dates are based (column C), and next highlight these dates in red on this calendar.
Is it possible to like these commandbuttons from Calendarfor to the cell dates?
I found some hint here:
but it doesn't really help me, as it refers to completely different set of code.
Can anyone help me to achieve it?
Any hint will be cordially appreciated, because I feel lost here frankly.