Public Sub SHCopyFile(ByVal from_file As String, ByVal _
to_file As String)
Dim sh_op As SHFILEOPSTRUCT
With sh_op
.hWnd = 0
.wFunc = FO_COPY
.pFrom = from_file & vbNullChar & vbNullChar
.pTo = to_file & vbNullChar & vbNullChar
.fFlags = FOF_ALLOWUNDO
End With
SHFileOperation sh_op
End Sub
|