Dim TheDate As Date Dim Index As Variant TheDate = ComboBox2.Value Index = Application.Match(CLng(TheDate), Range("Sheet1!b1:b10"), 0) If IsError(Index) Then MsgBox "Not Found" Else MsgBox "Match item: " & Index End If
Private Sub CommandButton1_Click() MsgBox Me.ComboBox1.ListIndex + 1, vbInformation, "Index of..." End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)