B
BigPig
Hi All,
In a userform with rows of comboboxes and textboxes, after exiting a
textbox, if there is nothing in it, and there is nothing in a combobox to
it's immediate left then "nothing", else do "this".
What I'm trying to do is with the ActiveControl name, I can ID the cbx to
the left, then check the cbx's value, and do this or that.
This is what I wrote, but I'm stumped.
With frm_tech_lv
Dim NameOfActiveControl As String
NameOfActiveControl = ActiveControl.Name
Dim CbxLvCtrlNm As String
CbxLvCtrlNm = "frm_tech_lv.cbx_tpl_" & Mid(NameOfActiveControl, 9,
4) & "_lc" & Right(NameOfActiveControl, 1)
Dim cbx As ComboBox
Set cbx.Name = CbxLvCtrlNm
If ActiveControl.Value = "" And cbx = "" Then
Else
MsgBox "From time needed."
Exit Sub
End If
End With
Any and all suggestions would be greatly appreciated. Thanks.
In a userform with rows of comboboxes and textboxes, after exiting a
textbox, if there is nothing in it, and there is nothing in a combobox to
it's immediate left then "nothing", else do "this".
What I'm trying to do is with the ActiveControl name, I can ID the cbx to
the left, then check the cbx's value, and do this or that.
This is what I wrote, but I'm stumped.
With frm_tech_lv
Dim NameOfActiveControl As String
NameOfActiveControl = ActiveControl.Name
Dim CbxLvCtrlNm As String
CbxLvCtrlNm = "frm_tech_lv.cbx_tpl_" & Mid(NameOfActiveControl, 9,
4) & "_lc" & Right(NameOfActiveControl, 1)
Dim cbx As ComboBox
Set cbx.Name = CbxLvCtrlNm
If ActiveControl.Value = "" And cbx = "" Then
Else
MsgBox "From time needed."
Exit Sub
End If
End With
Any and all suggestions would be greatly appreciated. Thanks.