copy macro

K

Kevin Carter

Hi

I have a workbook that saves several worksheets into another workbook using
VB code
Is it possible to have a macro save with the workbook?

the code below creates a workbook called all
strFileName = "tempy"
ThisWorkbook.Worksheets(Array("all")).Copy
ActiveWorkbook.SaveAs Filename:="C:\TEMP\test temp" & strFileName &
".xls"
ActiveWorkbook.Close

Is it possible to have a macro save with the workbook?

thanks


kevin
 

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

Similar Threads

excel 2010 + copy array 3
problems getting this macro to work 23
Copy sheets without the vb code 2
Macro help 2
macro to filter 6
save & backup file 2
macro filter 4
VBA help 2

Top