Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Opening a new workbook via a macro

When recording a macro and opening a new workbook it seems to just add 1 to
the Book no ( eg Book1,Book2 etc) if you've already opened a blank workbook-
I need to always open Book1 when opening via a macro - is this possible?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Opening a new workbook via a macro

hi
don't think so. deep in the background of excel's programming, excel keeps
track of how many blank workbooks it has added. this is a counter that does
not reset when you delete or rename the blank workbook. It does reset to zero
when you close excel. and the default workbook name is book & counter. excel
does the same thing with newly added sheets.
and i don't think you can change the name of wth newly added workbook untill
you have saved it once.

regards
FSt1


"Chris Maddogz" wrote:

When recording a macro and opening a new workbook it seems to just add 1 to
the Book no ( eg Book1,Book2 etc) if you've already opened a blank workbook-
I need to always open Book1 when opening via a macro - is this possible?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Opening a new workbook via a macro

Thanks for that I did notice that after closing Excel & reopening it the
default workbook became Book1 so I guess thats the way.

"FSt1" wrote:

hi
don't think so. deep in the background of excel's programming, excel keeps
track of how many blank workbooks it has added. this is a counter that does
not reset when you delete or rename the blank workbook. It does reset to zero
when you close excel. and the default workbook name is book & counter. excel
does the same thing with newly added sheets.
and i don't think you can change the name of wth newly added workbook untill
you have saved it once.

regards
FSt1


"Chris Maddogz" wrote:

When recording a macro and opening a new workbook it seems to just add 1 to
the Book no ( eg Book1,Book2 etc) if you've already opened a blank workbook-
I need to always open Book1 when opening via a macro - is this possible?

Thanks

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
VBA just stops when opening a macro workbook MSweetG222 Excel Programming 10 March 24th 09 11:18 PM
Opening a Workbook with a Macro Eli[_4_] Excel Discussion (Misc queries) 4 October 3rd 08 12:13 AM
Macro Opening or Looking for Another Workbook Toolman045 Excel Programming 6 June 13th 06 03:04 AM
Running macro upon opening workbook don Excel Programming 4 June 4th 06 06:17 PM
Run macro when opening workbook nsv Excel Discussion (Misc queries) 4 September 6th 05 12:19 PM


All times are GMT +1. The time now is 02:35 AM.

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"