Saving 500 sheets as .tpl extension, seperately!

  • Thread starter Thread starter Nick Smith
  • Start date Start date
N

Nick Smith

Folks,

I need to generate 473 .tpl files with the same single line content. This
line is in cell A1 on a sheet labelled 'content'. The list of file names is
in a sheet labelled 'names' in column A.

I am using the following to generate the first 3 files for testing purposes
which saves them nicely as .xls. I just need them as .tpl files for my
website though!

Sub SaveAs()

For i = 1 To 3
Name = ThisWorkbook.Sheets("names").Range("A" & i)
ThisWorkbook.Sheets(Array("content")).Copy
ActiveWorkbook.SaveAs (Name)
ActiveWorkbook.Close
Next i
End Sub

Any help greatly appreciated.

Thanks,

Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top