I have a drop down select list in a VBA form I would like to validate as soon the user clicks on it. It needs to check that a pre-requisite drop down has been filled already.
This is to avoid the user jumping ahead on the form because there are certain fields that need to be filled out first. My attempt so far is not working:
Private Sub cbo_moduleName_Click()
If Len(cbo_moduleCode.Value) = 0 Then
MsgBox ("Please select a module code")
Exit Sub
End If
End Sub
It seems the
Clickevent is activated only when the box’s value is changed with the mouse, not every time it is physically clicked on. Try this: