![]() |
|
|
|
#1
|
|||
|
|||
|
Sorted - probably quite long winded but it works
Code:
Private Sub CheckBox1_Click() Dim strSourceFile As String Dim StrDestinationFile As String If Me.CheckBox1 = True Then strSourceFile = "P:\Test Word Document.docx" StrDestinationFile = ActiveDocument.Path & "\Test Word Document.docx" FileCopy strSourceFile, StrDestinationFile Else If Me.CheckBox1 = False Then If Not Dir(ActiveDocument.Path & "\Test Word Document.docx", vbDirectory) = vbNullString Then Kill (ActiveDocument.Path & "\Test Word Document.docx") End If End If End Sub |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA FileCopy Source: problem
|
landonminden | Word VBA | 4 | 12-16-2015 01:02 AM |
Excel vba to check to check if two columns are empty
|
subspace3 | Excel Programming | 5 | 07-09-2015 04:45 PM |
| Multiple Check In/check Out Times | big0 | Excel | 4 | 09-19-2013 05:02 AM |
cannot check/uncheck check box but added check box
|
learn2office | Word | 1 | 11-27-2012 02:02 AM |
| Link word check box to access check box | Mrkieth | Word | 4 | 01-30-2012 06:43 AM |