make new .xls file

  • Thread starter Thread starter goss
  • Start date Start date
G

goss

Hi all.
Using xl xp pro

Would like to create a new empty .xls file
C:\windows\temp\data.xls

Have read through this ng quite a bit
Can't seem to find anything
All threads about saving current wb with save as
However control.xls has other data I don't want to send to end-users

just want to copy data from 3 sheets in control.xls to ....data.xls
 
Hi goss

Sub test()
Dim NWB As Workbook
Set NWB = Workbooks.Add
NWB.SaveAs "C:\Data\data.xls"
NWB.Close False
End Sub

just want to copy data from 3 sheets in control.xls to ....data.xls

Use this macro with control.xls as the activeworkbook

Sub test2()
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy
Set wb = ActiveWorkbook
wb.SaveAs "C:\Data\data.xls"
wb.Close False
End Sub
 
Back
Top