Results 1 to 3 of 3
  1. #1
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138

    FileCopy Funtion

    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?

  2. #2
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    I have added the End If, and changed the SourceFile to strOldPath. Problem persists.
    Last edited by dccjr; 04-18-2013 at 08:52 PM. Reason: Updates

  3. #3
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    Go it. There are not suppose to be any parens. I hate posting and then finding such a stupid mistake on my part.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Random Rdn() Funtion Help Please
    By graviz in forum Access
    Replies: 1
    Last Post: 12-09-2009, 11:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums