Hi and happy new year :D
I making a function to get the ComboBox ItemData value from ComboBox Text value.
I get error :
Compile error: Invalid qualifier
How can I define CmbName value as ComboBox name to look ?
Thanks :D
Couiiiinnnn :duck:
I making a function to get the ComboBox ItemData value from ComboBox Text value.
Code:
Private Sub CmbJLabelFormat_Click()
Call GetCmbItemData("CmbJLabelFormat", CmbJLabelFormat.Text)
End Sub
Private Sub GetCmbItemData(CmbName As String, CmbText As String)
Dim i As Long
For i = 0 To CmbName .ListCount - 1
If CmbName .List(i) = CmbText Then
MsgBox CmbName .ItemData(i)
Exit For
End If
Next
End Sub
Compile error: Invalid qualifier
How can I define CmbName value as ComboBox name to look ?
Thanks :D
Couiiiinnnn :duck: