Multi checkbox vba in word
Hi guys
I am new to VBA but I have tried writing a code in Word VBA. Does not seem to work as intended. Can anyone help please.
Basically I have 2 or more checkbox options. When I tick the first one, it works fine, but when I tick more than one (two boxes together), does not work. I am getting the spill from Autotext.
chkap & chkbp = True .... is this correct? that's where I am confused.
If chkAP = True Then
ActiveDocument.AttachedTemplate.AutoTextEntries("A utomaticPayment").Insert where:=Selection.Range, RichText:=True
ElseIf chkAP & chkBP = True Then ActiveDocument.AttachedTemplate.AutoTextEntries("A utomaticPaymentandBillPayment").Insert where:=Selection.Range, RichText:=True
End IF
Many Thanks
KP
|