Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Using a workbook name

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Using a workbook name

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)

"Chris Rees" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Using a workbook name

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
Chris Rees wrote:
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Excel Programming 1 April 1st 06 08:48 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"