Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-31-2015, 08:40 PM
gmayor's Avatar
gmayor gmayor is offline Array to iterate through variables and trap blank variables Windows 7 64bit Array to iterate through variables and trap blank variables Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Are you over-thinking this? Clearly your macro does not give the whole picture, but I would have thought

Code:
    Set myCopy = Documents.Add(ActiveDocument.FullName)
    With frmPrint
        On Error Resume Next
        Select Case True
            Case .chk1.Value
                myCopy.Bookmarks("hire").Range.Delete
            Case .chk2.Value
                myCopy.Bookmarks("void").Range.Delete
            Case .chk3.Value
                myCopy.Bookmarks("bright").Range.Delete
            Case .chk4.Value
                myCopy.Bookmarks("load").Range.Delete
        End Select
    End With
simpler?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
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