Help !! - Create files using VBA code
Hi Karthik,
The answer is to create the workbook and to use the save as option to
save it as
each name. A code snippet is attached.
Sub SaveFile()
Dim FilN As String
Dim wb As Workbook
Set wb = Workbooks.Add
do until < all names are done
FilN = {each name in turn}&".xls"}
wb.SaveAs FilN
Loop
End Sub
Hope that helps
Jai
"Karthik Bhat - Bangalore" wrote:
Hi
I have a file which is to be sent out to different recipients (at least
200). Although the file is same I need to send this to various
recipients with different file names. I have a list that is to be used
to name the files.
For example I have a file called Report.xls and have a list a, b,
c...z. (in a file Nemes.xls). I want a code that will save the file
report.xls as a.xls, b.xls.... z.xls in the specified folder/location.
I know this is possible using VBA code.
Can you helpme by giving some useful code?
Karthik Bhat
(Bangalore)
|