I am trying to use the FileCopy function in conjunction with the FileDialog box. I have the following:]
Code:
Private Sub cmdAddSeqSketch_Click()
Dim Dlg As FileDialog
Dim strOldPath As String
Dim strNewPath As String
Dim vrtSelectedItem As Variant
MsgBox ("To attach supporting documents to this RRCA Event Report, please select from the next window. (NOTE: Multiple files may be attached by holding Ctrl and selecting the desired files.")
Set Dlg = Application.FileDialog(msoFileDialogFilePicker)
With Dlg
.Title = "Select the file(s) you want to attach."
.AllowMultiSelect = False
If .Show Then
strOldPath = openDialog.SelectedItems(1)
strNewPath = "X:\Operations\Manufacturing\NADCAPdb(BE)\JointWeldmentSketches\"
FileCopy(SourceFile, strNewPath & Me.tbxWPSNo)
End With
End Sub
On the FileCopy line I am getting: "Compile error: Expected:=" yet none of the documentation I have found says anything other necessary properties. Anyone know what I am missing?