Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
File System Object Jason Zischke Excel Programming 3 August 30th 06 07:52 AM
How do I close a file system object? Steph Excel Programming 2 March 8th 06 04:09 AM
NTFS file system Christmas May[_2_] Excel Programming 1 April 12th 05 07:41 PM
File System Object Neil Excel Programming 2 September 10th 03 05:01 PM


All times are GMT +1. The time now is 09:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"