View Single Post
 
Old 08-04-2015, 03:49 AM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,980
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