Checking checkboxes

C

camilla

How can I do a check if both checkbox H28 and checkbox H29 is selected.in a
document?
I tried this but get errormessage 13
Public Sub KollkryssHuvud()
If ActiveDocument.Bookmarks("H28"). = True And
ActiveDocument.Bookmarks("H29") = True Then
MsgBox ("Du måste välja antingen Ja eller Nej")
End If
End Sub

Camilla
 
L

Lars-Eric Gisslén

Camilla,

Sub BestämDig()

If (ActiveDocument.FormFields("H28").CheckBox.Value = False And _
ActiveDocument.FormFields("H29").CheckBox.Value = False) Or _
(ActiveDocument.FormFields("H28").CheckBox.Value = True And _
ActiveDocument.FormFields("H29").CheckBox.Value = True) Then
MsgBox "Du måste kryssa för Ja eller Nej", _
vbExclamation, "Felaktigt val"
End If

End Sub

Regards,
Lars-Eric
 

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