I'm trying to do something relatively simple, but I'm still a newbie in
VBA, so I'm getting an odd error. This is my first post to this group.
My logic is this. If checkbox 'abc' is checked, then default a value
from a downdown list in a userform to a certain name, like "John Doe".
here's my short code:
Sub Exp84CheckBox()
'declare a variable as boolean, since checkboxes are yes/no,
true/false
Dim blnExp84Value As Boolean
'set the value of the variable to the value of the master
checkbox
blnExp84Value =
ActiveDocument.FormFields("expense84").CheckBox.Value
'if the master variable value is true (checked)
If blnExp84Value = True Then
ActiveDocument.FormFields("Approver1").DropDown.Value =
"John Doe"
End If
End Sub
---
However, I get an error that says:
"Run-time error '13':
Type mismatch
Can anyone help?