Wrox Programmer Forums
|
Forum and Wrox.com Feedback Post your suggestions for improving the Forums or Wrox.com or questions for the staff here. "Where can I find the code for my book?"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Forum and Wrox.com Feedback section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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





Similar Threads
Thread Thread Starter Forum Replies Last Post
user prompt with multi-select in vba for Excel ecivgamer Excel VBA 0 November 1st, 2011 03:56 AM
multi checkbox problem deean Classic ASP XML 0 June 30th, 2008 12:43 AM
Multi Checkbox selection - ASP cancer10 Classic ASP Databases 7 November 21st, 2006 01:00 AM
Excel/VBA Multi-Column Lookup - Round 2 RollingWoodFarm Excel VBA 4 August 3rd, 2006 07:28 PM
Checkbox on word document kareltje Excel VBA 3 February 17th, 2005 11:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.