Dim objfile As New FileSystemObject
objfile.CopyFile App.Path + "\assessDbP.mdb", App.Path + "\另一个目录\assessDbP"  & ".mdb"

解决方案 »

  1.   

    filecopy 函数!filecopy 文件路径,目标路径
      

  2.   

    就是cike_1111() 说的
    FileCopy 原来的文件, App.Path + "\目录"  & "\新的名字"
      

  3.   

    FileCopy 
    需要注意的是目标目录,如果目标目录不存在,则会出错。
      

  4.   

    可以先检查目标目录是否存在,程序可以建立目录
    Mkdir App.Path + "\目录"'存在报错继续下一句
    FileCopy 原来的文件, App.Path + "\目录"  & "\新的名字"
      

  5.   

    FileCopy 之前判断文件的存在与否
        用FileExists(路径+文件名) 返回布尔型
    用一下函数可以用来建多级目录
      Public Function MakeDir(Path As String) As Boolean
        On Error Resume Next
        Dim o_strRet As String
        Dim o_intItems As Integer
        Dim o_vntItem As Variant
        Dim o_strItems() As String
        o_strItems() = Split(Path, "\")
        o_intItems = 0
        For Each o_vntItem In o_strItems()
            o_intItems = o_intItems + 1
            If o_intItems = 1 Then
                o_strRet = o_vntItem
            Else
                o_strRet = o_strRet & "\" & o_vntItem
                MkDir o_strRet
            End If
        Next
        MakeDir = (Err.Number = 0)
    End Function