Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,566
- Office Version
- 365
- 2016
- Platform
- Windows
I have a combobox that is giving me an "invalid property value" , rather than the list of values, when I click on it. It doesn't break the code, ie I can't debug. I just have an {ok} button. I'm returned to the form, but repeated efforts to click on the combobox results in the same error. The error repeats then as I close the userform with the top right 'X'.
This is the code I am using to create the list for the combobox ...
I use the same code to set the list of values for that particular combobox in the userform initialization code and I have no problems.
If I step through my code, there are no errors, and the userform pops up. As soon as I click on the combobox, I get the message.
Is anyone able to offer any solution for me?
This is the code I am using to create the list for the combobox ...
Rich (BB code):
Private Sub uf8_rin_Change()
Dim s_rin As String
Dim rin As Long
Dim t_row As Long 'target row
If mbEvents Then Exit Sub
s_rin = uf8_prin.Value & uf8_rin
rin = s_rin * 1
If uf8_rin.Value = "" Then
With ws_psttemp
uf8_rin.BackColor = RGB(0, 168, 232)
uf8_tstat.BackColor = vbWhite
uf8_d_contract = ""
uf8_d_start = ""
uf8_d_end = ""
uf8_d_event = ""
uf8_d_league = ""
uf8_d_cust = ""
uf8_d_fac = ""
mbEvents = True
uf8_tstat = ""
uf8_cstat = ""
lr_basedata = ws_data.Cells(ws_data.Rows.count, "A").End(xlUp).row
For x = 2 To lr_basedata
uf8_rin.AddItem format(ws_psttemp.Range("T" & x), "000")
Next x
Stop
mbEvents = False
End With
Else
t_row = Application.WorksheetFunction.Match(rin, ws_psttemp.Range("A:A"), 0)
With ws_psttemp
uf8_rin.BackColor = vbWhite
uf8_tstat.BackColor = RGB(0, 168, 232)
uf8_d_contract = .Range("F" & t_row)
uf8_d_start = format(.Range("G" & t_row), "h:mm AM/PM")
uf8_d_end = format(.Range("H" & t_row), "h:mm AM/PM")
uf8_d_event = " " & .Range("L" & t_row)
uf8_d_league = " " & .Range("M" & t_row)
uf8_d_cust = " " & Application.WorksheetFunction.VLookup(.Range("F" & t_row), ws_rd.Range("A:K"), 11, False)
uf8_d_fac = " " & .Range("C" & t_row) & " " & .Range("D" & t_row)
End With
End If
End
I use the same code to set the list of values for that particular combobox in the userform initialization code and I have no problems.
If I step through my code, there are no errors, and the userform pops up. As soon as I click on the combobox, I get the message.
Is anyone able to offer any solution for me?
Last edited: