View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bigwheel bigwheel is offline
external usenet poster
 
Posts: 222
Default Saving a file to a different path

You'd be better off using a different variable for filename, say myFile for
example.
myFile = yyyy-mm-ddwilv.csv

Then this will save the file:-

ActiveWorkbook.SaveAs Filename:= new_dir + "\" + myFile, _
FileFormat:=xlCSV, CreateBackup:=False



"SVTman74" wrote:

OK I have searched and searched this board and do not see what I need.

I need a very basic macro to save a *.csv file to another Directory.

What I am doing is parsing huge amounts of data and saving the parsed file
to another directory. I got the macro to do what I want, is the automating I
dont get, I eventual want to use a .cmd file to run on the weekend opne each
*.csv file parse the data then save this to another dir.

for those interested the variables:
filename = yyyy-mm-ddwilv.csv ( date is creation date of file from the
import)
Old dir = Q:\TRS_RAW ( network share btw)
new dir = R:\TRS_DATA ( network share)

I have been looking but cant find what I want :/

Thanks in advance.