Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody
I have a workbook that contains a procedure which: 1, Opens a .xls from a SourceDir 2, Alters the contents of this .xls 3, Produces and saves a CSV file to a CSVTargetDir 4, Saves and closes the altered .xls to AnotherTargetDir Is it possible to move the original .xls file from the SourceDir to an ArchiveDir ? Many thanks PS using Excel 2002 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pete,
Check out FileCopy and Kill. NickHK "PraxisPete" wrote in message ... Hi everybody I have a workbook that contains a procedure which: 1, Opens a .xls from a SourceDir 2, Alters the contents of this .xls 3, Produces and saves a CSV file to a CSVTargetDir 4, Saves and closes the altered .xls to AnotherTargetDir Is it possible to move the original .xls file from the SourceDir to an ArchiveDir ? Many thanks PS using Excel 2002 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
PraxisPete:
Is it possible to move the original .xls file from the SourceDir to an ArchiveDir ? try, Set fs = CreateObject("Scripting.FileSystemObject") fs.CopyFile ThisWorkbook.FullName, "c:\" & ThisWorkbook.Name -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "PraxisPete" wrote: Hi everybody I have a workbook that contains a procedure which: 1, Opens a .xls from a SourceDir 2, Alters the contents of this .xls 3, Produces and saves a CSV file to a CSVTargetDir 4, Saves and closes the altered .xls to AnotherTargetDir Is it possible to move the original .xls file from the SourceDir to an ArchiveDir ? Many thanks PS using Excel 2002 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim OldName, NewName
OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names. Name OldName As NewName ' Rename file. OldName = "C:\MYDIR\OLDFILE": NewName = "C:\YOURDIR\NEWFILE" Name OldName As NewName ' Move and rename file. -- HTH RP (remove nothere from the email address if mailing direct) "PraxisPete" wrote in message ... Hi everybody I have a workbook that contains a procedure which: 1, Opens a .xls from a SourceDir 2, Alters the contents of this .xls 3, Produces and saves a CSV file to a CSVTargetDir 4, Saves and closes the altered .xls to AnotherTargetDir Is it possible to move the original .xls file from the SourceDir to an ArchiveDir ? Many thanks PS using Excel 2002 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving Files into an archive | Excel Discussion (Misc queries) | |||
Moving files which are linked | Excel Discussion (Misc queries) | |||
Moving xls files that have links?? | Links and Linking in Excel | |||
Moving files via code | Excel Programming | |||
Moving Files in Excel | Excel Discussion (Misc queries) |