Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-04-2015, 03:49 AM
Guessed's Avatar
Guessed Guessed is offline Array to iterate through variables and trap blank variables Windows 7 32bit Array to iterate through variables and trap blank variables Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,177
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
 

Tags
array, bookmark, variable



Similar Threads
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
Array to iterate through variables and trap blank variables Document Variables vs CustomDocumentProperties 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
Array to iterate through variables and trap blank variables Nesting Variables SET, LISTNUM, and REF Wyskers Word 1 11-13-2011 05:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft