How to customize Excel default settings ?

filippe

New Member
Joined
Nov 16, 2005
Messages
2
There are a number of settings in Excel that I don't like and I have to change everytime I enter new data, and I am trying to find a way to automate these changes.

For example:

how can I ensure that all cells in new worksheets or workbooks have vertical alignment set to Top, without having to change it manually ?after creation of the new worksheet?

how can I ensure that a new pivot table has Autoformat disabled?

how can I ensure that a new external ODBC query has the Save password with query property enabled?

etc...

I guess I can achieve that by add-hoc macros, associated to the events triggered by the creation of the new objects indicated above. What I am looking for is a generic solution to change the default settings of future objects, rather than a case-by-case approach
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,402
For help on your new worksheet defaults look at the Excel help for Customize The Defaults For A Worksheet By Using A Template.
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
workbook and worksheet defaults can be set by making templates called book.xlt and sheet.xlt and putting them in the xlstart folder.

As far as I know, the rest only by macros as you suggest.
 

filippe

New Member
Joined
Nov 16, 2005
Messages
2
I don't think a template will do the trick... that's precisely why I asked.

For example, even if I create a template with the vertical alignment in all cells the way I like, this will work for a new workbook based on this template, but as soon as I create a new worksheet in this workbook, he cells in the new worksheet will revert to the default vertical alignment.

Similarly, I don't see how the template could solve my issue on pivot tables. (btw, which event is triggered when a pivt table is created with the wizard?)
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
The Following is how I do it! because I do not like to show grid lines when I open a workbook.


Create a workbook template for new workbooks
Create a workbook that contains the sheets, default text (such as page headers and column and row labels), formulas, macros, styles, and other formatting you want in new workbooks that you base on the template.


On the File menu, click Save As.
Show Me

In the Save as type box, click Template (*.xlt).


In the Save in box, select the folder where you want to store the template.
To create the default workbook template, select either the XLStart folder or the alternate startup folder. The XLStart folder is usually
C:\os\Profiles\user_name\Application Data\Microsoft\Excel\XLStart
where os is the operating system folder — for example, Windows.

To create a custom workbook template, select the Templates folder, which is usually
C:\os\Profiles\user_name\Application Data\Microsoft\Templates
where os is the operating system folder, for example, Windows.

In the File name box, type book to create a default workbook template.
To create a custom template, type any valid file name.

Tip To display a picture of the first page of a template in the Preview box of the New dialog box (File menu), click Properties on the File menu, click the Summary tab, and then select the Save preview picture check box.
 

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,402
Filippe,

you say:
For example, even if I create a template with the vertical alignment in all cells the way I like, this will work for a new workbook based on this template, but as soon as I create a new worksheet in this workbook, he cells in the new worksheet will revert to the default vertical alignment.
No, that's wrong ... both myself and BrianB have already said that creating a template specifically for new worksheets would do this for you. You can have templates for book and sheet ( as BrianB has said ), and you don't seem to realise the difference.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,069
Messages
5,570,010
Members
412,304
Latest member
citrus
Top