The Microsoft Excel Subkey

The following is a list of entries in a typical Microsoft Excel subkey:

AddIn Path
AltStartup
Asst in Wizard
AutoFormat
AutoFormat Options
Basics
CmdBarData
Comment
Default Chart
DefaultPath
DefFileMRU
Font 
GalleryPath 
GlDft-HelpType

GlDft-DemoSpeed
Maximized
MenuKey
MoveEnterDir
MRUFuncs
MsoTbCust
NoPBPAlert
NoXL5ModuleTabsAlert
Options
Options3
Options5
Options6
SavedQueriesFolder
StickyPtX
StickyPtY
TipShown
UndoHistory
UserName
WinCodePage
Wizard Timestamp

Specifying the Paths That You Want Excel to Search for Add-Ins

To specify the paths that Microsoft Excel will search for add-ins when the Tools/Add-ins command is invoked, use the AddIn Path entry. The value for this entry is a string of all the paths that Microsoft Excel should search for add-ins. Multiple path entries are delimited by a semicolon. Your custom solution should only append to this string to avoid inadvertently removing a path to other custom solutions.

Specifying an Alternate Startup Directory

The AltStartup entry allows you to specify an alternate directory in which to locate files you want to open each time you start Microsoft Excel. When you start Microsoft Excel, files located in the XLSTART directory are loaded automatically, followed by files located in the alternate startup directory. The General tab of the Tools/Options command lets you modify this setting.

Specifying Automatic Formatting Options

With the AutoFormat and AutoFormat Options entries, you can specify a particular default formatting choice to be used when the AutoFormat tool is clicked. For the AutoFormat entry, the value specifies the format you want. The formats are numbered 1 through 14 according to the order in which they appear in the list in the AutoFormat dialog box.

The AutoFormat Options entry controls which formatting attributes are applied for the format you specified in the AutoFormat entry. The formatting attributes correspond to the options in the AutoFormat dialog box. The values for the formatting attributes are shown in the following table.

AutoFormat Options

Indicates

1

Number

2

Font

4

Alignment

8

Border

16

Patterns

32

Width/Height


For example, set the AutoFormat Options value to 0x0000000a(10) to specify that just the font and border properties of a format are applied. The number 10 is the sum of 2 (font) and 8 (border). The default value for AutoFormat Options is 0x0000003f(63), the sum of all of the numbers, indicating that all of the formatting properties are applied.

Specifying Whether to Run the Online Tutorial at First Startup

Normally, when you start Microsoft Excel for the first time, the online tutorial "Introducing Microsoft Excel" runs automatically. This occurs when the Basics entry is set to 0x00000000(0). After the first startup, the Basics entry is set to 0x00000001(1) and the tutorial no longer runs at startup. If you reset this to 0x00000000(0), the tutorial will run the next time Microsoft Excel is started, after which it will again be reset to 0x00000001(1).

The CmdBarData Setting

The CmdBarData setting stores data for built-in command bars that are shown, hidden, or moved. Once you create a new command bar or customize an existing one, all information is saved in the *.xlb file.

Setting the Default Chart Format

The Default Chart entry specifies the default chart format. You can set this option from the Chart tab of the Tools/Options command.

Setting the Default File Location Path

The DefaultPath entry specifies the default path used by Microsoft Excel for the File Open and File Save As commands. You can set this option from the General tab of the Tools/Options command.

Setting the Number of Files Shown on the Most Recently Used Files List

The DefFileMRU entry specifies the number of files shown on the Most Recently Used Files list. You can set this option from the General tab of the Tools/Options command. Microsoft Excel initially sets this value to 0x00000004(4).

Setting the Number of Sheets in New Workbooks

The DefSheets entry specifies the number of new worksheets in each new workbook. This entry will appear only if the Sheets in New Workbook entry under the General tab of the Tools/Options command has been modified. If the value of the DefSheets entry is 0x00000001(1), when you create a new workbook, the new workbook will contain one worksheet.

Setting the Default Font for Microsoft Excel

To set the default font and font size used for new worksheets, the Font key is used. The syntax of the value setting for the Font key is:

font name,font size

For example,

MS Sans Serif,10

The font name you enter must be the name of the font spelled exactly as it appears in the dialog box when you choose the Font tab of the Cells... command from the Format menu. In Microsoft Excel 97, the Font registry entry sets the default font used for the Normal style, for row and column headings, and for text in the Info window. If the default font has not been changed from Arial, this key might not be present.

Specifying the Path to the User-Defined Chart Gallery

The GalleryPath entry is used to specify the path to the xlusrgal.xls file, which contains the user-defined chart gallery.

Specifying Options in Help for Lotus 1-2-3 Users

There are two entries, GlDft-HelpType and GlDft-DemoSpeed, that correspond to options in the Help for Lotus 1-2-3 Users dialog box. The GlDft-HelpType entry indicates whether you want Help for Lotus 1-2-3 Users to display a set of instructions 0x00000000(0) or give a demonstration 0x00000001(1) for the typed-in Lotus 1-2-3 commands.

The GlDft-DemoSpeed entry controls the speed of the demonstration. This entry will appear in the registry only if the GlDft-HelpType value has been set to 0x00000001(1). When 0x00000001(1) (Demo) is indicated as the G1Dft-HelpType entry value, this can be a number from 0x00000001(1) to 0x00000005(5), where 1 is slow and 5 is fast.

Setting the Application Window Size

The Maximized entry indicates the size of the application window and the size of the workbook window when you start Microsoft Excel. The size of the application window and the size of the workbook window are controlled by the value of this entry, as shown in the following table.

Maximized

Indicates

0

Application window is xlNormal; workbook window is xlNormal.

1

Application window is xlMaximized; workbook window is xlNormal.

2

Application window is xlNormal; workbook window is xlMaximized.

3

Application window is xlMaximized; workbook window is xlMaximized.


When the application window is not maximized, the Pos entry sets the size and position of the window. The first two coordinates set the distance in points (1 point = 1/72 inch) from the left and top of the screen to the top left corner of the window. The second pair of coordinates sets the size of the window in points.

Specifying the Transition Menu or Help Key

The MenuKey entry indicates the ASCII value corresponding to the character used to invoke Microsoft Excel menus or Help. The default key is the slash (/) key. For example, if you changed the menu key in the Transition tab of the Tools/Options command to the backslash (\) key, the MenuKey entry recorded in the registry would be 0x0000005c(92).

Specifying the Direction the Cursor Moves After Enter

The MoveEnterDir entry specifies the direction in which the cursor will move after the ENTER key is pressed. You can set this option from the Edit tab of the Tools/Options command.

Value

Indicates

0

Down

1

Right

2

Up

3

Left


Setting the Most Recently Used Functions List

The MRUFuncs entry specifies the functions that appear in the most recently used list in the Function Wizard. In the MRUFuncs value string, they appear in the order in which they were used. In the Function Wizard, they appear in alphabetical order. The complete list of function numbers appears in the XLCALL.H file in the INCLUDE directory on the sample disk. For example, function number 6 is the MIN function (xlfMin in XLCALL.H).

The MsoTbCust Setting

When the 0x04 bit is set, then the old Excel .XLB has been read and converted. When the 0x08 bit is set, then a new .XLB has been created for this user (usually of the form username8.XLB).

Disabling the Welcome to Page Break Preview Dialog

The NoPBPAlert setting determines whether or not the Welcome to Page Break Preview dialog is displayed when entering page break preview mode. When this value is set to 0x00000001(1) the dialog box is not displayed. This is equivalent to checking the option "Do not show this dialog box again." in the Welcome to Page Break Preview dialog.

Disabling the Excel 5/7 Modules Information Dialog

The first time a user opens a workbook containing Excel 5/7 VBA modules, Excel 97 displays a dialog box informing the user of the new VBE editor. The NoXL5ModuleTabsAlert setting determines whether this dialog is displayed. When this value is set to 0x00000001(1), the dialog box is not displayed. This is equivalent to checking the option "Do not show this dialog box again."

Specifying Documents That You Want Opened Automatically

You can use either of the following methods to specify documents that you want opened each time you start Microsoft Excel.

The XLSTART Directory

The first method you can use to specify a document that you want opened automatically is to place the document in the XLSTART directory. During installation, the XLSTART directory was automatically created in the directory in which Microsoft Office was installed.

The OPEN Entry

The second method you can use to specify a document that you want opened automatically is to add an OPEN entry to the Microsoft Excel section of the registry. For example, to open BUDGET92.XLS automatically, add the following value:

c:\excel\budget92.xls 

where \excel is the path to the directory containing the file you want to open.

Option Switches for the OPEN Entry

You can use the /r and /f option switches, alone or together, to modify the behavior of the OPEN entry. The /r option switch opens the file as read-only. The /f (fast load) option switch places template documents in the New dialog box (accessed from the File menu). When used to open a macro sheet containing custom functions, the /f option switch places those functions in the Function Wizard dialog box. When you use one of the custom functions in a specified document, the macro sheet containing the function is opened automatically.

For example, to open the file BUDGET.XLS as read-only every time Microsoft Excel is started, use the following value:

/r c:\excel\budget92.xls

To enter more than one OPEN entry, you must number them sequentially. For example, OPEN, OPEN1, OPEN2, and so on.

If you have a macro sheet named CUSTOM.XLM that contains function macros, the following value will cause it to open automatically, and the functions it contains will be added to the User Defined function category in the Function Wizard dialog box:

/f c:\excel\custom.xlm 

To use the /f switch with add-in macro sheets (.XLA), you must define the name __DemandLoad (the string "DemandLoad" preceded by two underscores) for the workbook. Microsoft Excel checks to see if the name is defined; the actual definition that you use is not important. You can define __DemandLoad as the Boolean value TRUE, for example.

When an OPEN entry is used to open an add-in macro sheet on which the name __DemandLoad is defined, custom functions are displayed in the Function Wizard dialog box, but the add-in is not actually loaded until one of its functions is recalculated.

Note

The Add-In Manager (the Add-Ins command on the Tools menu) reads and writes OPEN entries.

Setting Other Options

There are many other options that can be set using the four Option entries. These entries are Options, Options3, Options5, and Options6.

The Options entry in the registry sets the following options:

Options

Indicates

1

Show scroll bars

2

Show formula bar

4

Show status bar

16

Use A1-style references

64

DDE is enabled

bits 7 and 8

Apple Macintosh command underlines


The Options3 entry in the registry sets the following options:

Options3

Indicates

0

Alternate menu key on

2

Alternate navigation keys on

4

Lotus 1-2-3 help on

8

Cell note indicators off

32

Macros are saved in the Personal Macro Workbook

16384

Gridlines in new sheets off


For example, you set the Option3 entry to:

0x00000008(8)

to automatically turn off cell note indicators each time you start Microsoft Excel. To specify more than one of these options, add the numbers for the options you want. For example, an Options3 entry of 0x00000006(6) turns on both alternate navigation keys (2) and Lotus 1-2-3 Help (4).

The Options5 entry in the registry sets the following options:

Options5

Indicates

Bit 0

Tip Wizard is on

Bit 1

Prompt for Summary Info

Bit 2

Editing directly in cells is not allowed

Bit 3

Status bar is visible in full-screen mode

Bit 4

Formula bar is visible in full-screen mode

Bit 5

Full-screen mode

Bit 6

Most-recently used file list is not displayed

Bit 7

Cut, copy, and sort objects with cells

Bit 8

Tool tips off

Bit 9

Small toolbar buttons

Bit 10

Toolbar auto-sensing

Bit 11

Do not move to next cell after Enter key is pressed

Bit 12

Do not warn before drag-drop copy or paste

Bit 13

Use black-and-white toolbar buttons

Bit 14

Ask to update automatic links


The Options6 entry in the registry sets the following options:

Options6

Indicates

Bit 0

Show chart tip names

Bit 1

Show chart tip values

Bit 2

Intellimouse roll action. 0 = zoom, 1 = scroll

Bit 3

Set when macro virus warning is enabled


Specifying the Web Queries Directory

The SavedQueriesFolder entry specifies the directory in which Web query (*.iqy) files will be stored.

Setting the Default Display Location for Dialog Boxes

There are two entries, StickyPtX and StickyPtY, that indicate the preferred location where dialog boxes appear on the screen; they are updated every time you exit Microsoft Excel.

StickyPtX and StickyPtY are the x and y coordinates of the current "sticky" point. The sticky point is the point on which dialog boxes are centered when they first appear on the screen. When a user moves a dialog box, a new sticky point is calculated based on the location of the dialog box when it is closed.

The Tip Wizard History

The TipShown setting saves the Tip Wizard tip history. It stores the list of all tips that have been shown so far. Unless the user resets the Tip Wizard, these tips will probably not be shown again.

Specifying Undo Levels

The optional setting UndoHistory determines the number of undo levels to enable. This number can be set anywhere from zero to some number in the 2 billion range. However, it's best to keep the number as small as is practical in order to keep the memory from filling up with Undo information.

Specifying a User Name

With the UserName entry, you can enter a user name for your copy of Microsoft Excel. Then, if you are using a shared document and someone else on the network tries to open it, a message is displayed along with the specified user name.

Specifying the Windows Code Page

The optional setting WinCodePage specifies the Windows code page. The default is WinCodePage=1252 (or omitted). This value may be different in foreign versions of Windows (for example, 1250 for East European Windows). The WinCodePage= statement is directly copied by the Microsoft Excel Setup program from the [Boot] section in the SYSTEM.INI file. WinCodePage is written into the CODEPAGE record of BIFF files so that they can be loaded correctly under different environments.

Setting DDE Advise Format Retention

If the CFDDELink option is set to 1, Microsoft Excel remembers the last clipboard format used for a successful DDE Advise operation; this is used to reduce the time required for future Advise cycles.