I have a listbox and a MonthView. I want to know how to get all the dates from column B that have the same value as the selected in the listbox from column A.
this is my attempt:
[VBA]Private Sub MonthView1_Click()
Dim bolddate As Date
Dim dates As Range
Dim i As Integer
Set dates = Application.WorksheetFunction.VLookup(ListBox1.Value, Sheet.Range("A:B"), 2, False)
For i = 1 To 34
If dates(i) > MonthView1.Month Then MonthView1.DayBold(dates(i)) = True
Next i
End Sub[/VBA]
Any ideas? Ive attached my sheet to make explanation easier