Changing a menu button in my XL template

B

Brad E.

Hi, all,

I would prefer if the "Comma Style" button were set up differently for me
EVERY time I use Excel 2007.

By recording a macro, and going to Home > Styles > Cell Styles > Number
Format > (right-click on) Comma > Modify, then changing the format how I want
it, the following code was produced:
With ActiveWorkbook.Styles("Comma")
.IncludeNumber = True
.IncludeFont = False
.IncludeAlignment = False
.IncludeBorder = False
.IncludePatterns = False
.IncludeProtection = False
End With
ActiveWorkbook.Styles("Comma").NumberFormat = "#,##0"

Is there a way to have this code run every time I open Excel?

I have already attempted this, and there are 2 files in my XLSTART folder:
Book.xlsx
Book.xltx
I assume I will have to save a file to my XLSTART folder - but which format
should I use? and should I get rid of either of the two files which are
currently in there?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top