View Single Post
  #1 (permalink)  
Old August 28th, 2012, 11:59 PM
vkp vkp is offline
Registered User
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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