Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
which books..? | New Users to Excel | |||
VBA-Books | Excel Programming | |||
Books | Excel Programming | |||
Books on VBA | Excel Programming | |||
Books | Excel Programming |