#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default new books

I was wondering if there is any way to reset the new book count in excel with
a macro. Currently I have a macro that creates a new book, adds data to it,
and then saves it with a new name. What I have noticed is that if I run the
macro a few times the new book comes up as book1, book2, book3. Is there any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default new books

Not that I am aware of.

--
Regards,
Tom Ogilvy


"whylite" wrote:

I was wondering if there is any way to reset the new book count in excel with
a macro. Currently I have a macro that creates a new book, adds data to it,
and then saves it with a new name. What I have noticed is that if I run the
macro a few times the new book comes up as book1, book2, book3. Is there any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default new books

If it's really that important to you, the only way I know is to close Excel
and reopen it.
Not really worth it.
You could make a template called "Book1.xlt" and open that each time if you
really want to keep "Book1.xls" everytime.

NickHK

"whylite" ...
I was wondering if there is any way to reset the new book count in excel
with
a macro. Currently I have a macro that creates a new book, adds data to
it,
and then saves it with a new name. What I have noticed is that if I run
the
macro a few times the new book comes up as book1, book2, book3. Is there
any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default new books

Thanks for the response. There has to be a way rather than to close right
out of excel and reopen I will keep looking thank you.
--
Thanks!
Shane W


"NickHK" wrote:

If it's really that important to you, the only way I know is to close Excel
and reopen it.
Not really worth it.
You could make a template called "Book1.xlt" and open that each time if you
really want to keep "Book1.xls" everytime.

NickHK

"whylite" ...
I was wondering if there is any way to reset the new book count in excel
with
a macro. Currently I have a macro that creates a new book, adds data to
it,
and then saves it with a new name. What I have noticed is that if I run
the
macro a few times the new book comes up as book1, book2, book3. Is there
any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default new books

That's the way Excel works.
If you create a new workbooks, it increments the number each time, only
resetting when Excel closes.
Is it really such a big deal if you are only .SaveAs anyway ?

NickHK

"whylite" wrote in message
...
Thanks for the response. There has to be a way rather than to close right
out of excel and reopen I will keep looking thank you.
--
Thanks!
Shane W


"NickHK" wrote:

If it's really that important to you, the only way I know is to close

Excel
and reopen it.
Not really worth it.
You could make a template called "Book1.xlt" and open that each time if

you
really want to keep "Book1.xls" everytime.

NickHK

"whylite"

...
I was wondering if there is any way to reset the new book count in

excel
with
a macro. Currently I have a macro that creates a new book, adds data

to
it,
and then saves it with a new name. What I have noticed is that if I

run
the
macro a few times the new book comes up as book1, book2, book3. Is

there
any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default new books

I have a change link macro. If the current link is to book1 (unknown
destination) then the macro opens up a new book (book1) in order to execute
properly. This is the only way to make it work. I could go into the change
link in the tool bars and do it that way successfully every time but I have
many individuals using my spreadsheets that have limited knowledge in excel.
As it stands right now one can only change link once with my macro. If they
open another file and try to change the link book2 comes up and the change
link fails. That's why I would like to figure out a way to reset the counter.
--
Thanks!
Shane W


"NickHK" wrote:

That's the way Excel works.
If you create a new workbooks, it increments the number each time, only
resetting when Excel closes.
Is it really such a big deal if you are only .SaveAs anyway ?

NickHK

"whylite" wrote in message
...
Thanks for the response. There has to be a way rather than to close right
out of excel and reopen I will keep looking thank you.
--
Thanks!
Shane W


"NickHK" wrote:

If it's really that important to you, the only way I know is to close

Excel
and reopen it.
Not really worth it.
You could make a template called "Book1.xlt" and open that each time if

you
really want to keep "Book1.xls" everytime.

NickHK

"whylite"

...
I was wondering if there is any way to reset the new book count in

excel
with
a macro. Currently I have a macro that creates a new book, adds data

to
it,
and then saves it with a new name. What I have noticed is that if I

run
the
macro a few times the new book comes up as book1, book2, book3. Is

there
any
way a macro could reset the counter so that every time Book1 comes up.
--
Thanks!
Shane W






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default new books

Why not change it open a template called Book1 (or whatever) instead of
Workbooks.Add.
Then oyu always have the same.
The "template" doesn't have to contain anything special, just the name.

NickHK

"whylite" ...
I have a change link macro. If the current link is to book1 (unknown
destination) then the macro opens up a new book (book1) in order to
execute
properly. This is the only way to make it work. I could go into the
change
link in the tool bars and do it that way successfully every time but I
have
many individuals using my spreadsheets that have limited knowledge in
excel.
As it stands right now one can only change link once with my macro. If
they
open another file and try to change the link book2 comes up and the change
link fails. That's why I would like to figure out a way to reset the
counter.
--
Thanks!
Shane W


"NickHK" wrote:

That's the way Excel works.
If you create a new workbooks, it increments the number each time, only
resetting when Excel closes.
Is it really such a big deal if you are only .SaveAs anyway ?

NickHK

"whylite" wrote in message
...
Thanks for the response. There has to be a way rather than to close
right
out of excel and reopen I will keep looking thank you.
--
Thanks!
Shane W


"NickHK" wrote:

If it's really that important to you, the only way I know is to close

Excel
and reopen it.
Not really worth it.
You could make a template called "Book1.xlt" and open that each time
if

you
really want to keep "Book1.xls" everytime.

NickHK

"whylite"

...
I was wondering if there is any way to reset the new book count in

excel
with
a macro. Currently I have a macro that creates a new book, adds
data

to
it,
and then saves it with a new name. What I have noticed is that if
I

run
the
macro a few times the new book comes up as book1, book2, book3. Is

there
any
way a macro could reset the counter so that every time Book1 comes
up.
--
Thanks!
Shane W








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
which books..? Roy New Users to Excel 3 October 15th 06 09:41 AM
VBA-Books Looney Excel Programming 2 March 15th 06 02:19 AM
Books Big Dov Excel Programming 1 August 23rd 05 09:44 PM
Books on VBA Cabaco Excel Programming 3 April 5th 05 05:27 PM
Books lc Excel Programming 2 November 10th 03 09:27 PM


All times are GMT +1. The time now is 03:53 PM.

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

About Us

"It's about Microsoft Excel"