View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Muhammed Rafeek M Muhammed Rafeek M is offline
external usenet poster
 
Posts: 179
Default Add new workbook with new name

try this way:

Sub TestWA() Workbooks.Add
ActiveWorkbook.SaveAs "Test.xls"
End Sub

pls do rate

"MarMo" wrote:

Hi there ,
To add a new workbook with VBA the code is a follows :
Workbooks.add
This opens a new workbook with the default name book1.xls

Is there a way to alter the name when adding a new workbook ?
I'd like to add the name through my VBA code when adding a new book.

Thanks for any replies
MarMo