Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default I want to change Excel, not just the current Workbook

In my XLSTART folder, I have saved an .xltm file, where a single line in the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2 decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

In a new workbook amend the Comma style as you want. Save the workbook with
no code in the XLSTART folder as a normal workbook named Book1.xlsx (or in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

Sorry that's not right at all, my memory must be playing tricks, will have a
look later

Peter T

"Peter T" <peter_t@discussions wrote in message
...
In a new workbook amend the Comma style as you want. Save the workbook
with no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or in whatever format you prefer), note do not save as a template, no
code required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

I was nearly right, name it Book.xlsx

Regards,
Peter T

"Peter T" <peter_t@discussions wrote in message
...
In a new workbook amend the Comma style as you want. Save the workbook
with no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or in whatever format you prefer), note do not save as a template, no
code required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

Still wrong, lets try again, save as a template named Book.xltx in the
XLSTART folder

Regards,
Peter T

"Peter T" <peter_t@discussions wrote in message
...
I was nearly right, name it Book.xlsx

Regards,
Peter T

"Peter T" <peter_t@discussions wrote in message
...
In a new workbook amend the Comma style as you want. Save the workbook
with no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or in whatever format you prefer), note do not save as a template, no
code required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default I want to change Excel, not just the current Workbook

Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same for all
workbooks? When I open an old workbook, and select a (pre-filled) cell to
change to My comma style, it still uses the MS Comma Style (with 2 decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the workbook with
no code in the XLSTART folder as a normal workbook named Book1.xlsx (or in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in the
"#,##0" format?
--
TIA, Brad E.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

Our posts crossed, I suspect my suggestion as quoted below merely opens the
wb a single time, see my other post and save as a template named Book.xltx
in the start folder (note, without the "1" in the name)

Sorry for the confusion,
Peter T
..
"Brad E." wrote in message
...
Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same for
all
workbooks? When I open an old workbook, and select a (pre-filled) cell to
change to My comma style, it still uses the MS Comma Style (with 2
decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the workbook
with
no code in the XLSTART folder as a normal workbook named Book1.xlsx (or
in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line
in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in
the
"#,##0" format?
--
TIA, Brad E.






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default I want to change Excel, not just the current Workbook

Still not there...
I have changed the "Comma Style" button by going he
Home Styles Cell Styles Comma (right-click) Modify

I have saved this Workbook as an .xlsx and as an .xltx in the XLSTART
folder, deleting any other files which were in the folder. I don't see any
difference whether using xlsx or xltx. However, in each case, when I open a
pre-existing workbook, the button works as Microsoft's default setup.
--
TIA, Brad E.


"Peter T" wrote:

Our posts crossed, I suspect my suggestion as quoted below merely opens the
wb a single time, see my other post and save as a template named Book.xltx
in the start folder (note, without the "1" in the name)

Sorry for the confusion,
Peter T
..
"Brad E." wrote in message
...
Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same for
all
workbooks? When I open an old workbook, and select a (pre-filled) cell to
change to My comma style, it still uses the MS Comma Style (with 2
decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the workbook
with
no code in the XLSTART folder as a normal workbook named Book1.xlsx (or
in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single line
in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in
the
"#,##0" format?
--
TIA, Brad E.






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

Did you save as Book.xltx

For testing, colour format some cell in the saved Bookxltx, each time you
open a new book you should see your coloured cell. Note this only works for
new workbooks.

If you want all your old workbooks to include the modified style you'll need
to add it to each workbook as a one-off operation. Of course that can be
done programmatically, eg as a batch process open all files in a folder,
amend the built in style, save and close.

Regards,
Peter T

"Brad E." wrote in message
...
Still not there...
I have changed the "Comma Style" button by going he
Home Styles Cell Styles Comma (right-click) Modify

I have saved this Workbook as an .xlsx and as an .xltx in the XLSTART
folder, deleting any other files which were in the folder. I don't see
any
difference whether using xlsx or xltx. However, in each case, when I open
a
pre-existing workbook, the button works as Microsoft's default setup.
--
TIA, Brad E.


"Peter T" wrote:

Our posts crossed, I suspect my suggestion as quoted below merely opens
the
wb a single time, see my other post and save as a template named
Book.xltx
in the start folder (note, without the "1" in the name)

Sorry for the confusion,
Peter T
..
"Brad E." wrote in message
...
Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same for
all
workbooks? When I open an old workbook, and select a (pre-filled) cell
to
change to My comma style, it still uses the MS Comma Style (with 2
decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the workbook
with
no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or
in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single
line
in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in
the
"#,##0" format?
--
TIA, Brad E.








  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default I want to change Excel, not just the current Workbook

I never did use BOOK1, always just BOOK, so I wasn't having some problems you
were. The testing I used was to close Excel and open Excel. When typing a
number 999 in A1, it would display as "1234". After clicking the "Comma
Style" button, it would display as "1,234". This morning, though, the button
would have made it display as "1,234.00 " (notice the trailing space, too...I
don't like that)

Thanks for the answer, that this is relative to the specific workbook and I
would have to programmatically change all existing workbooks.

I thought of a couple of questions while typing up this last comment.

Is this button format saved for the Workbook, and all co-workers (network
drive) will get the same functionality in any Workbook I create, or is it
specific to my machine and workbook?

How does Book.xltx differ from Book.xlsx? I have never been clear on when
to use a template file.

Thanks again, Peter
--
Brad E.


"Peter T" wrote:

Did you save as Book.xltx

For testing, colour format some cell in the saved Bookxltx, each time you
open a new book you should see your coloured cell. Note this only works for
new workbooks.

If you want all your old workbooks to include the modified style you'll need
to add it to each workbook as a one-off operation. Of course that can be
done programmatically, eg as a batch process open all files in a folder,
amend the built in style, save and close.

Regards,
Peter T

"Brad E." wrote in message
...
Still not there...
I have changed the "Comma Style" button by going he
Home Styles Cell Styles Comma (right-click) Modify

I have saved this Workbook as an .xlsx and as an .xltx in the XLSTART
folder, deleting any other files which were in the folder. I don't see
any
difference whether using xlsx or xltx. However, in each case, when I open
a
pre-existing workbook, the button works as Microsoft's default setup.
--
TIA, Brad E.


"Peter T" wrote:

Our posts crossed, I suspect my suggestion as quoted below merely opens
the
wb a single time, see my other post and save as a template named
Book.xltx
in the start folder (note, without the "1" in the name)

Sorry for the confusion,
Peter T
..
"Brad E." wrote in message
...
Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same for
all
workbooks? When I open an old workbook, and select a (pre-filled) cell
to
change to My comma style, it still uses the MS Comma Style (with 2
decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the workbook
with
no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or
in
whatever format you prefer), note do not save as a template, no code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single
line
in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get 2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display in
the
"#,##0" format?
--
TIA, Brad E.



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default I want to change Excel, not just the current Workbook

Is this button format saved for the Workbook,

Yes, that is, if by "button" you mean the amendable Comma style. So for your
new workbooks based on Book.xltx the styles will persist, as indeed will any
other workbooks that have been updated with "your" styles.

I'm relying here on memory here, which has already been shown to be fallible
as to exactly how to define a custom formatted default workbook! But easy
enough for you to test and check out for yourself.

Regards,
Peter T


"Brad E." wrote in message
...
I never did use BOOK1, always just BOOK, so I wasn't having some problems
you
were. The testing I used was to close Excel and open Excel. When typing
a
number 999 in A1, it would display as "1234". After clicking the "Comma
Style" button, it would display as "1,234". This morning, though, the
button
would have made it display as "1,234.00 " (notice the trailing space,
too...I
don't like that)

Thanks for the answer, that this is relative to the specific workbook and
I
would have to programmatically change all existing workbooks.

I thought of a couple of questions while typing up this last comment.

Is this button format saved for the Workbook, and all co-workers (network
drive) will get the same functionality in any Workbook I create, or is it
specific to my machine and workbook?

How does Book.xltx differ from Book.xlsx? I have never been clear on when
to use a template file.

Thanks again, Peter
--
Brad E.


"Peter T" wrote:

Did you save as Book.xltx

For testing, colour format some cell in the saved Bookxltx, each time you
open a new book you should see your coloured cell. Note this only works
for
new workbooks.

If you want all your old workbooks to include the modified style you'll
need
to add it to each workbook as a one-off operation. Of course that can be
done programmatically, eg as a batch process open all files in a folder,
amend the built in style, save and close.

Regards,
Peter T

"Brad E." wrote in message
...
Still not there...
I have changed the "Comma Style" button by going he
Home Styles Cell Styles Comma (right-click) Modify

I have saved this Workbook as an .xlsx and as an .xltx in the XLSTART
folder, deleting any other files which were in the folder. I don't see
any
difference whether using xlsx or xltx. However, in each case, when I
open
a
pre-existing workbook, the button works as Microsoft's default setup.
--
TIA, Brad E.


"Peter T" wrote:

Our posts crossed, I suspect my suggestion as quoted below merely
opens
the
wb a single time, see my other post and save as a template named
Book.xltx
in the start folder (note, without the "1" in the name)

Sorry for the confusion,
Peter T
..
"Brad E." wrote in message
...
Thanks, Peter, it works great for all new workbooks.

Now, do you know if there is a way to make that button act the same
for
all
workbooks? When I open an old workbook, and select a (pre-filled)
cell
to
change to My comma style, it still uses the MS Comma Style (with 2
decimals).
--
TIA, Brad E.


"Peter T" wrote:

In a new workbook amend the Comma style as you want. Save the
workbook
with
no code in the XLSTART folder as a normal workbook named Book1.xlsx
(or
in
whatever format you prefer), note do not save as a template, no
code
required.

This should act as the template for new workbooks.

Regards,
Peter T


"Brad E." wrote in message
...
In my XLSTART folder, I have saved an .xltm file, where a single
line
in
the
Workbook_Open event reads:
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"
When I open another workbook, and push the "Comma" button, I get
2
decimals
for the cell(s). How can I make my "Comma" button ALWAYS display
in
the
"#,##0" format?
--
TIA, Brad E.



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default I want to change Excel, not just the current Workbook

Pre-existing workbooks will not be affected by your settings in xltx
template.

Only new workbooks.

Styles are saved with the workbook so you will have to change the style in
the pre-existing workbooks.


Gord Dibben MS Excel MVP

On Thu, 5 Mar 2009 09:46:01 -0800, Brad E.
wrote:

Still not there...
I have changed the "Comma Style" button by going he
Home Styles Cell Styles Comma (right-click) Modify

I have saved this Workbook as an .xlsx and as an .xltx in the XLSTART
folder, deleting any other files which were in the folder. I don't see any
difference whether using xlsx or xltx. However, in each case, when I open a
pre-existing workbook, the button works as Microsoft's default setup.


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default I want to change Excel, not just the current Workbook

When using a Template, a workbook is opened based on that Template.

The Template is never opened directly, so users cannot edit it, just edit
the opened workbook and save as whatever name suits them.

Template remains untouched ready for next use..

*.xlsx is just a regular workbook. If users edit and save, you have lost
the original.


Gord Dibben MS Excel MVP


On Thu, 5 Mar 2009 10:28:02 -0800, Brad E.
wrote:

How does Book.xltx differ from Book.xlsx? I have never been clear on when
to use a template file.


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
Button to send current excel workbook by email Chris O Excel Discussion (Misc queries) 1 March 23rd 09 10:57 PM
Running an Excel AddIn from Access in Current WorkBook....Help!!!! Tirelle Excel Programming 5 January 2nd 08 10:19 AM
Change current directory to the directory that the workbook loads from! alondon Excel Programming 5 April 17th 07 06:05 AM
excel change default column sort to current selection john palmer Excel Worksheet Functions 2 March 8th 05 03:07 PM
i made change in a current workbook and accidentally save it, can. angel Excel Discussion (Misc queries) 1 January 4th 05 01:11 AM


All times are GMT +1. The time now is 07:24 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"