DemBones79
Programmer
I have inherited several macros from my predecessors. One in particular is giving me a hard time. It never had a cancel button before, only an OK. I've tried coding one in and it appears just fine, but it doesn't actually do anything. I'm afraid I don't understand the rest of the code well enough to figure it out. If anyone can help, I'd sure appreciate it.
Code:
Function dlgFNRFunc(identifier$, action, suppvalue)
dlgFNRFunc = True
Select Case action
Case 2
Select Case identifier$
Case "BtnOK"
If dlgValue("cbxHome") = 1 Then dlgFNRFunc = False
If dlgValue("cbxAlt1") = 1 Then dlgFNRFunc = False
If dlgValue("cbxAlt2") = 1 Then dlgFNRFunc = False
End Select
End Select
End Function
Begin Dialog dlgFNR 140, 120, "FNR Attempt Dialog Box", .dlgFNRFunc
ButtonGroup .ButtonPressed
OkButton 7, 89, 53, 14, .BtnOK
CancelButton 67, 88, 50, 14
GroupBox 10, 10, 100, 70, "Attempted To Call"
CheckBox 15, 20, 91, 12, "Home Phone", .cbxHome
CheckBox 15, 35, 91, 12, "Alt1 Phone", .cbxAlt1
CheckBox 15, 50, 91, 12, "Alt2 Phone", .cbxAlt2
End Dialog
Dim dlgVar As dlgFNR
On Error Resume Next
nRet = Dialog(dlgVar)
attempt_home = dlgVar.cbxHome
attempt_alt1 = dlgVar.cbxAlt1
attempt_alt2 = dlgVar.cbxAlt2