Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA saving csv files to a specified path?

Status
Not open for further replies.

knifey

Technical User
Nov 14, 2006
180
GB
Hi,
I have a file converter written in Excel VBA that needs to output all worksheets in csv format to an output directory path specified in the Excel worksheet (the folder is called 'Output'). It then needs to zip these csv files and rename the zip.
My problem is I can't get the csv files to save in the correct directory. They save in the current workbook directory with names such as OutputClients.csv, OutputPatients.csv, etc.
Can anyone advise?
Thanks,
Roy
 


Hi,
Code:
With Thisworkbook
  sFName =  .path & "\Output\" & YourFileName 
end with


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
What is your actual code creating the csv ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top