I have many toolbox controls in my word document i have mouse down
action that passes the control name to the deselect function. in the
deselect function i have a message box that asks if you want to
deselect the option button. I just need the code to deselect the
option button.
Private Sub optStep1Pass_MouseDown(ByVal Button As Integer, ByVal Shift
As Integer, ByVal X As Single, ByVal Y As Single)
Call Deselect("optStep1Pass")
End Sub
Public Function Deselect(ControlName)
Dim intMsgBoxAnswer As Integer
test = MsgBox("Do you want to deselect the control?", vbYesNo,
"Deselect Button")
If intMsgBoxAnswer = vbYes Then
' Need Code
ElseIf intMsgBoxAnswer = vbNo Then
End If
End Function
frogman - 16 Aug 2006 23:29 GMT
I figured it out
Private Sub optStep1Pass_MouseDown(ByVal Button As Integer, ByVal Shift
As Integer, ByVal X As Single, ByVal Y As Single)
Deselect optStep1Pass
End Sub
Public Function Deselect(ControlName)
Dim intMsgBoxAnswer As Integer
If ControlName = True Then
intMsgBoxAnswer = MsgBox("Do you want to deselect the control?",
vbYesNo, "Deselect Button")
If intMsgBoxAnswer = vbYes Then
ControlName = False
CountPassFail
End If
Else
ControlName = True
End If
End Function