Route for new workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I'm in process of create new workbook via VBA, did like this:
Set wb = Workbooks.Add(1)

But I was confused what is the route of my new workbook, and if I want to
assign a pre-defined route, how to do?

Could you give any sign? Thanks,
Viesta
 
Viesta,
If you have just added a new WB, the need to .Save it give it a path. eg.
Dim WB As Workbook
Set WB=Workbooks.Add(1)
WB.Save PathAndFilename

NickHK
 
I believe it does make sense. and I will take try after reading the Saveas
method in Help Files.

BTW, is sheets.add in the same case?

Thanks so much Nick!
 
Viesta,
Sheets.Add is not the same, as a sheet does have a path; the WB that
contains it does.

NickHK
 

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