I'd like to add a msgbox that will notify the user if the schematic they
are looking for doesn't exists in the list.
Can anyone help this is what I have but it doesn't work. What am I
forgetting?
Dim SpaOnly As Boolean
Dim PoolOnly As Boolean
Dim PoolSpa As Boolean
Dim Msg, Style, Title, Response
Function GetEQ()
If SpaOnly And Raised = True Then
EQ$ = "RSWV"
ElseIf PoolSpa And PCC = True Then EQ$ = "PCS"
ElseIf PoolOnly And PCC = True Then EQ$ = "PC2"
ElseIf SpaOnly And Vac = True Then EQ$ = "SWV"
ElseIf PoolOnly = True Then EQ$ = "NP"
ElseIf SpaOnly = True Then EQ$ = "SWV"
ElseIf PoolSpa = True Then EQ$ = "PAS"
Else
EQ$ = " "
End If
End Function
GetEQ
If EQ$ = " " Then
Msg = "Sorry, Schematic Unavalable"
Style = vbOKOnly + vbCritical
Title = "Unavailable Schematic !"
Response = MsgBox(Msg, Style, Title)
End If
If I paste the code into a command button it works fine. Why does it fail
in the above code? Thanks again.