deselect an inline shape

F

frogman

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
 
F

frogman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top