![]() |
#5
|
||||
|
||||
![]()
Since the checkboxes are not mutually exclusive, I would use a function
Code:
Sub aTest() Set myCopy = Documents.Add(ActiveDocument.FullName) ProcessCheckbox frmPrint.chk1, "hire", myCopy ProcessCheckbox frmPrint.chk2, "void", myCopy ProcessCheckbox frmPrint.chk3, "bright", myCopy ProcessCheckbox frmPrint.chk4, "load", myCopy End Sub Function ProcessCheckbox(aCtl As Control, sBkmk As String, myCopy As Document) If aCtl.Value = True Then If myCopy.Bookmarks.Exists(sBkmk) Then myCopy.Bookmarks(sBkmk).Range.Delete End If End If End Function
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
array, bookmark, variable |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
can word: make variables, find appropriate pages, fill out pages with variables, print only those | 20GT | Word VBA | 1 | 10-15-2014 09:48 PM |
![]() |
Cosmo | Word VBA | 2 | 08-11-2014 01:35 PM |
Onenote equations and variables | debun | OneNote | 0 | 04-15-2014 10:43 AM |
Find and replace using variables | jago25_98 | Word | 1 | 01-31-2012 04:30 AM |
![]() |
Wyskers | Word | 1 | 11-13-2011 05:43 AM |