0

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...

enter image description here

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:

How to highlight target holidays in a calendar in VBA and hyperlink task worksheets with business day only

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.

Geographos
  • 827
  • 2
  • 23
  • 57
  • This has nothing to do with [fullCalendar](https://fullcalendar.io/) as far as I can see, so I removed the [fullCalendar tag](https://stackoverflow.com/questions/tagged/fullcalendar) from your question. In future please read a tag's [info](https://stackoverflow.com/tags/fullcalendar/info) before using it. A summary also appears if you hover your mouse over each tag. If you use irrelevant or incorrect tags, then the wrong people will see your question, and won't have the right expertise to help you. Thanks. – ADyson May 19 '20 at 16:40
  • I am not clued as wide as you frankly speaking. Really sorry for the mess, but in my opinion more tags more chance for help, but... you know better having 36,1K reputation :) – Geographos May 19 '20 at 19:47
  • "more tags more chance for help"...only if they're actually relevant to the question though. If you tag this with "Oracle" do you think a bunch of Oracle database experts can help you with your VBA trouble? No, unless they happen to also have a VBA skillset too - in which case they'd probably be following the VBA tag already and have already seen your question. My reputation score doesn't allow me to know better or worse (in some ways it's merely a badge of longevity as much as knowledge), but it's just common sense surely, to target your question at the tags that relate to the tech it's using – ADyson May 19 '20 at 20:54
  • OK Thank you. On the other hand - are you able to help me with this problem? – Geographos May 20 '20 at 08:03
  • No, sorry. Because my specialism is Javascript, fullCalendar, HTML, that sort of thing. I only saw your question via the erroneous fullCalendar tag. The last time I had the displeasure of using VBA was about 15 years ago, thankfully, and my brain has kindly allowed me to forget almost everything about the experience. Good luck! – ADyson May 20 '20 at 08:17

0 Answers0