VBA and File System Object
I have a script written that successfully copy's a file to a directory
based on varibles. I now need lines of code that move files. I copied
the lines of code to and changed the varibales to match and nothing is
moved. If i change the wording back to FSO.CopyFile, it works, but not
FSO.MoveFile... any ideas??? If I put in breaks, and hover over the
variables, they all have the correct values:
code:
__________________________________________________ ________________________
Me.txtArchFile = [Forms]![frmGuides]![sfrmFileName]![HypLink]
StrFileNameToArch = Me.txtArchFile
If IsNull(StrFileNameToArch) Or StrFileNameToArch = "" Then
Exit Sub
Else
FSO.MoveFile Source:=strCurrentLoc & StrFileNameToArch, _
Destination:=strArchLoc & StrFileNameToArch, _
overwritefiles:=True
End If
Thanks,
Dave
On Error GoTo 0
|