I need to show values in combobox that have no values to the left of them. It is a calendar with dates as the first column and then either events or blanks in the next column. For my form I want only the dates with blanks to show in the combobox. So far I have this code, but I'm having trouble adding a loop as it makes excel crash. I would then need code to input an event to the sheet next to a date (I have added a textbox to the form to do this). This is my code so far:
Sub BookAPartyButton_click()
BookAParty.Show
Dim i As Integer
Dim w As Worksheet
Set w = Worksheets("Calender")
With BookAParty.ComboBox1
i = 3
If w.Cells(i, 2) = "" Then
.AddItem w.Cells(i, 1)
i = i + 1
End If
End With
End Sub
Please help!
Bookmarks