Using a workbook name

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

Guest

Is there anyway to use a workbook name in code without using
application.getsaveasfilename or getopenfilename? As I am trying to create
multiple workbooks from a master workbook and would prefer not to have to
save the workbook every time.
 
The workbook doesn't get a full name until it is saved.

You could always create a workbook object when you save it

Set oWB = Workbooks.Add

and use that object after that.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Just set the workbook name or workbook itself to a variable and use it
however you want.
Dim wbName As String
wbName=ActiveWorkbook.Name
or
Dim wb As Workbook
Set wb = AvtiveWorkbook
 

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