View Single Post
  #1   Report Post  
KQBats KQBats is offline
Junior Member
 
Posts: 5
Default VBA loop to create named .csv files for all worksheets and workbooks in a folder

Hi all

I don't have a great deal of experience with VBA, but can usually muddle my way through. I have drawn a blank with the following, however.

I have a folder containing multiple excel workbooks, all of which are of the same structure. The workbooks contain multiple work sheets. I want to write a macro that saves each worksheet within each workbook as a separate .csv file that is named "NameofWorkBook_NameofWorkSheet". These would all be saved into the existing folder.

I have been reading threads on similar topics and trying to meld them together, but the best I have been able to do is save each worksheet within a single workbook as the name of the worksheet. I am using Excel 2010. Any assistance with sample code, or directing me to where this has previously been addressed would be most appreciated.

Thanks in advance...