Working with MS Excel Toolbars, Custom Buttons and Menus
Location: http://www.mvps.org/dmcritchie/excel/toolbars.htmHome page: http://www.mvps.org/dmcritchie/excel/excel.htm [View without Frames]
[document] [identify] [emergency] [backup] [builtin] [missing] [losttitlebar] [menuloss] [menumissing] [toolbarid] [docking] [addtoolbar] [addicon] [custom] [morestuff] [custom] [customrt] [customdn] [macros] [viewmacro] [changemenu] [menu] [menusxl2k] [tooltips] [xl2ktbm (buttons)] [xl2kmenus] [euro] [ico] [tstico] [scrCapture] [irnfarview] [menus] —  (fragment-ids like customrt, customdn, Emergency, tstICO, scrCapture have all been changed to lowercase) The Excel that I used in writing this page was XL95 (Excel Version 7.0.A). My system was Windows NT 4.0 Workstation. I have since upgraded to XL2000 (Excel ver 9) and am now using XL2002 and these instructions basically remain the same as for XL95. The main difference is the picture of my toolbars, and simplified attachment of tooltip description to a button, other differences are noted with version symbols for XL2000. I expect that anything marked as Excel 2000 also applies for Excel 97 and Excel 98 (Macintosh version).
The first suggestion here is to print an Excel screen to a sheet of paper and file it. This way if anything happens to your toolbars it will help you restore or improve your settings. It may turn out that the toolbars simply became rearranged or deactivated.Make sure the EXCEL window is selected then use ALT + PrintScreen. Paste the window to the word pad or to MS Word. Print the document and file the sheet with your Excel materials.
Use the [\?] button (Shift+F1] to identify a button, but you should have tool tips on so should see them on a mouse over anywayo.Button Faces (BtnFaces), Jim Rech, download from Stephen Bullen's MVP page, will examine your Excel and report the buttons you actually have.
Listing Button Faces in the Command Bar for the Microsoft Office System (Microsoft Office 2003 Technical Articles), came out later appearance wise same as Jim Rech's program. Regular Expression Support in Microsoft Office System Smart Tags (Microsoft Office 2003 Technical Articles) [IP Addresses]
An older program is John Walkenbach's Identifying FaceID Values for CommandBar Images (Developer Tip 67) which has pictures of Excel 97 icons rather than what you might actually have and there is link to another by John McLean that shows all of the buttons.
Before continuing,
- Full Screen mode (F11) hides toolbars, hit F11 to reshow (also on View menu).
- If options are grayed out that is not the same as missing (see Grayed Out). (also see related area)
- Make sure you don't have personalized menus where items display or don't display depending on your personal usage history.
Any changes to your toolbars affect the appearance of all Excel books. If you have not exited your Excel window you may restore by clicking on your *.XLB (toolbar) file in the directory containing your toolsbar Microsoft Windows (c:/WINNT, ...). If a search does not locate your *.xlb file, it is because it is hidden -- in using Excel you have an *.xlb file, and the date of the one you used will match the last time you closed Excel.
Be sure that your folder options (My Computer) show file extensions for your own safety. Most people should also make sure they see hidden files as well, in fact you may not see your *.xlb (toolbars) file unless you do show hidden files. System Files may be hidden so people don't see them, don't know about them, don't copy them, or can't delete them.
I always show all files myself, but Jim Rech points out... If you use Windows to search for such files be sure that your search options include searching in System and Hidden/Read-Only folders. I would consider it very unsafe to not show file extensions -- viruses are often distributed by tacking on a fake file extension before the real file extension to make a file with a virus look harmless ( innocentlookingfile.txt.scr ) because what looks like a harmless .txt file is instead a .scr file which are often used to pass viruses. You will not find *.xlb files unless you do not show hidden files.
Use MS Start --> FIND use *.XLB to locate something like EXCEL5.XLB (Win95), EXCEL8.XLB (Win97), or <user>8.XLB (network) or Administrator.XLB (WinNT). You can open that file from the FIND window. Restoration of the toolbars is immediately apparent. [is BOOK.XLB in same category?]If you restore your toolbars file from a backup do it with Excel down and restore it to the same place. If you mess up the toolbars during your session simply open the toolbars file from Excel immediately. When you close Excel the toolbars file is always saved, so if you close Excel you will have to go to your backup, work with what you have, or start over. If you did restore toolbars from an old backup and the pathnames do not match you will have to fixup Restored Toolbars something you want to avoid.For my own use in XL95 that was c:\WinNT\Administrator.xlb
or in XL2000 it is c:\WinNT\Profiles\Administrator\Application.Data\Microsoft\Excel.xlb
or in C:\Documents and Settings\Administrator\Application Data\Microsoft\Excel\Excel.xlb
The XLSTART directory is in the same directory.Using the find will probably show up only one .XLB so it really should not be a problem, but here is another set of possiblities, this one oriented to version of Excel rather than system, which may be more correct, though Excel version, system, and network all appear to play a role.
Excel 5: Excel5.xlb
Excel 95: <UserName>.xlb
Excel 97: <UserName>8.xlb
Excel 2000: Excel.xlb in the user's Application Data area.
backup your system on a regular basis so you can restore your toolbars. The above relies on your immediate attention. With a backup you can restore over the damaged file later. [More information on backup.htm page]If you restore your toolbars from a backup you may find a problem exists with the macro assignments, even if to the same directory on the same volume. Reentering the macro assignments with a macro to recursively run through the toolbars and and reassign the macro based on current content -- even if exactly the same -- see BarHopper macro.
The builtin defaults can be seen in Figure 3, on another page (due to the large picture sizes). Other versions may vary. To restore a toolbar to it's builtin default use the RESET button in Toolbars.View --> toolbars --> (select toolbar) --> [RESET] buttonIf you have made any customizations to your toolbars you do not want to reset your toolbars unless all other methods fail. See topics on missing toolbars, missing menu items, emergency restore of toolbars, backing up and restoring toolbars, and documenting toolbars.
A toolbar may be placed in the spreadsheet area (floating toolbar). There are four docking areas. A toolbar may be docked above the formula bar at the top, or above the status bar at the bottom. There are two vertical docking areas, one to the left of the row numbers, and one the right of the of the scroll bars. The vertical docking areas will not accept toolbars containing buttons with pull down menus (STD, MS 3.0, Format -- style, size, and font).If a section of toolbars suddenly disappears, it is probably because you dragged them off the screen, unchecked the toolbar in the Toolbar window, or unchecked the toolbar on a toolbar pull down from any toolbar.
To restore an individual toolbar View --> Toolbars, put a check against the missing toolbar (fig. 1). Refer to figure3 to identify each toolbar.
Full screen view does not have a title bar at top,
should have menu bar,
does not show toolbars,
does show sheet name tabs
does not show status bar at bottom
Because you may be missing some things the shortcuts are also shown
View, alt + v
Full Screen, Alt + u (toggle)
To close full screen view
Close, Alt + c
View , Alt + v
Tools, Alt + t
Customize, Ctrl + c
Tools, Alt + t
Customize, Alt + c
right-click on the menu or toolbar area, (Alt+t)
Click on Customize, (Alt+c)
Toolbars Tab on the Customize dialog,
near the end activate menus with
[x] Worksheet Menu bar.Another possibility is that the menus got docked at the sides or bottom of your spreadsheet to left of column numbers or to right of vertical scrollbars. You should always see menu bars, if visible, at the top of full screen view -- View [Alt+V], Full Screen [Alt+U].
Programming can hide the menu bar, and can reactivate
application.CommandBars("worksheet menu bar").Enabled = true
You can enter the above in the immediate window, from the VBE (alt+f11), use Ctrl+G, type in the above command and hit EnterIf the above does not work, try opening the .XLB file (as described above under emergency), and if that doesn't work rename the .XLB file so that Excel will be forced to create a default one.
Loss of the tools menu: One way to get to customize is from the Tools menu, but if you lose the tools menu you can still get to customize with a right click on the menu bar or tools bar and then choose *customize* then ...Choose the Commands (tab) , next to the bottom on the left size is the "Builtin Menus", then on the right grab "Tools" and drag it to the Tool bars after "File" and "Edit".View --> Tool bars --> Customize (shortcut Right-click on menu bar)Within the Customize dialog scoll down on left side to "Built-in Menus" then on the right side grab "File" (or whichever is mising) oand drag it to the first spot on the Excel "Worksheet Menu Bar".
The menus I see on my menu bar are:
File, Edit, View, Insert, Format, Data, Tools, Window, HelpIf you catch an error immediately before closing Excel, one method of recovery is to open the latest .XLB file you find on your system possibly named excel.xlb as previously described in Emergency above.
If you've made real serious errors in defining menus and toolbars and want to start from scratch then delete your .xlb toolbar and Excel will recreate the default toolbars for you. Probably not something to do unless you are starting completely over on a new machine or version of Excel and don't like what you currently have.
Personalized (short) menus abomination was introduced in Excel 2000 such that only the Most Recently Used (MRU) items appear. To restore the old options ...
Tools --> Customize --> Options(tab) --> (uncheck) Menus show recently used commands first.To turn off Personalized Menus in your operating system, click Start, point to Settings, click Taskbar & Start Menu, and then uncheck Use Personalized Menus on the General tab.
Excel 2007 doesn't have menus and instead has a "Ribbon" which is very bad design because things don't line up like they had in menus, and so looks to be extremely disorganized. It's not a bad as it looks, but it will take you twice as long to get to where you need to go, because of all of the extra clicks, and wide physical separation of options to select from compared to menus. To get around that you will have to make more use of Excel Keyboard Shortcuts. If you had created your own customized menus and are now stuck with Excel 2007, you might want to look at Excel 2007.
Try View --> Toolbars -- the following should be checked on
[x] Standard
[x] Formatting
if you made up some of your own tool bars possibly also
[x] Toolbar 1 - 3To reenable menu bars, toolbars, calculation and other things see reset_things macro currently in code/proper.txt
If you look carefully you will see a line between sections of toolbars. Tool bars may be identified by pointing the cursor to the sectional area surrounding a group of buttons. Clicking will then reveal the name of the toolbar (docking area only) on the status line, which normally says "Ready". Figure 2 indicates "Auditing Tools".If you look carefully at your toolbars you will see a vertical line between sets of toolbars. You can select an entire toolbar by clicking beside one of the buttons in the toolbar. A toolbar can be dragged to any of the toolbar areas including the spreadsheet itself. If the toolbar is dragged out of the Excel window it is removed, and can be restored from View --> Toolbars.
Toolbars are added to a docking area in the order that you check them off under toolbars. If you uncheck all toolbars and hit [OK], then you check Standard, then Audit, then Formatting that will be their order. You can move them around though.You have to be in customize mode to move a toolbar around and/or redock it. Use tools, customize OR right click on the toolbar area to get into customize.
Then to move the tool bar around grab it on the left (or top) side so that the cursor changes to Move pointer type (4 headed arrow) and drag it to where you want it to float, or where you want to dock it at top, left, right, or bottom.
To add a toolbar start with customize (tools, customize) then from the toolbars tab use the [Add] button to add a toolbar. move the created toolbar to the toolbars area and you are now ready to add your icon buttons to your toolbar. The next step is to add your icons with macro assignments to your toolbars.
Customizing your toolbars is from customize, and there are several ways of getting into customize:
- View --> Toolbars --> Customize, --or from--
- Tools --> Customize, --or from--
- right-click on toolbars area --> Customize
To add a button to a toolbar select one of the choices under customize, move the button to the toolbar you want to see it in. Click on an button in customize and look in lower left corner of customize window for it's description.
Add or delete a toolbar button
To delete a button, drag it off the toolbar to delete.
- Customize (Tools --> Customize)
- Click on the Commands tab
- To add a button, click the name of the category in the Categories box, and then drag the button or item from the Buttons area to the displayed toolbar.
It can be moved to another toolbar, instead of deleting, but dragging it to the worksheet area will delete the button.If a button is dragged off a toolbar during customize it can only be restored from an existing toolbar or the builtin pattern toolbars. It is for this reason that you should store originals in a hidden toolbar.
Right-click on the toolbar icon to assign a description, and to assign a macro.
figure 1 -- Toolbars (View --> Toolbars)
Tip When you delete a built-in toolbar button from a toolbar, the button is still available in the Customize dialog box. However, when you delete a custom toolbar button, it is permanently deleted. To delete a custom toolbar button from a toolbar but save it for later use, create a toolbar for storing unused buttons, move the button to this storage toolbar, and then hide the storage toolbar.
Customize -- Options
The options should appear as below (see picture)If there is anything in the short delay box, turn on recently used,
Customize ---------------------------- Toolbars |Commands |Options| -------------------+ Personalized Menus and Toolbars [ ] Standard and Formatting toolbars share one row [ ] Menus show recently used commands first [ ] show full menus after a short delay [-Reset my usage data-] Other [ ] Large icons [X] List font names in their font [X] Show screenTips on toolbar menu animations: (none)
remove short delay checkmark, turn off recently usedCustomiziations (#custom)
Changes on my toolbars that are not show below but may be shown at a later date. What I use is simply an example of how to customize toolbars. It works for me, you will probably have other preferences."Select Visible Cells" button [Alt+;(semicolon)] found under Customize on the Utility set of buttons and looks like four horizontal rectangle (2x2). Starting with selected cells it will reduce the selection to only those that are visible. This button is especially useful when changing fonts and background colors on Group outlines created with Data --> Subtotals. I place it to left of BOLD [B] button on my toolbars.
"Strike Through" button [Ctrl+5] which I placed to right of bold, italic, underscore, and double underscore.
Some buttons I created to handle inserting a line and going to the top of a column, both of which can be seen below under Put a descriptive Name on that Custom Button.
figure 2 -- Sample Screen shot for Excel 2000
figure 3 -- Sample Screen shot for Excel 2002 (Excel XP)
Excel10.xlb is 51KB (on 2005-11-23)
A view with individual toolbars identified in Excel 2000 is not included here because of the space it would occupy on this page and the size of the download. But you can see it and additional toolbars for both Excel 2000 and and Excel 95 ) on Figure 3, another page.
There is a also a set of Custom buttons that you can use to activate your own macros. The yellow smilely in figure 2, for instance, cab be used to activate the PutFileNameInFooter macro.
Is it possible to set the Zoom value (in standard toolbar) to a new value for all next openings of Excel 95? (--Primoz Bradac--)Set the zoom to the new default and 'Save As' Book.xlt (Template) to the startup directory, (With XL97, normally C:/Program%20Files/Microsoft Office/Office/Xlstart/) (--Nick Hodge--) [assumes you don't already have a template]Some buttons have keyboard opposites that can be used by using the shift key in combination with a button to get it's opposite.If you have book.xlt or sheet.xlt templates, they belong in your XLSTART directory. Used for defaults when creating new files. The sheet.xlt is used for default when adding new sheets to an existing Excel file.
The startup directory will be found as something similar to
C:\Program Files\Microsoft Office\Office\Xlstart\
H:\Program Files\Microsoft Office2000\Office\XLStartOne example is using shift with the single underscore button to effect a double underscore. Another is Shift+F1 to get the [\?] help button. See article by Laura Stewart in Woody's Office Watch (21 July 1999, Vol 4 No 30).
For information on invoking a macro using a Custom Button refer to HELP topic topics
- buttons (toolbar)
- running macros
- Option Buttons, Creating
- buttons (custom dialog box)
Custom Buttons
Toolbars --> [customize] --> custom -->
then in XL97 - XL2000 select the Commands Tab.
Drag a button to the toolbar --> assign an existing macroI have assigned one custom button to include a filename with full pathname in the left footer. Since the toolbars are in effect for all my Excel usage the macro is installed as follows: personal.xls!PutFileNameInFooter
Who called a macro -- name of a button
msgbox Commandbars.Actioncontrol.CaptionCreating a Custom button with a NEW image
I don't know how you store the graphics so that you upgrade to a new EXCEL or put your new buttons into someone else's Excel.From looking at: HELP --> buttons (toolbar), button image
It becomes apparent that one should at least take certain steps to not lose the newly created buttons. The buttons should be placed onto a hidden toolbar so that they do not get accidentally deleted. From the hidden toolbar the icons can be copied to another toolbar. APPARENTLY THEY CAN NOT BE COPIED.
- View --> toolbar --> Customize
- If you don't already have a "Special" toolbar, create a new toolbar well identified e.g.
enter a name: Special Toolbar for David McRitchie
Then hit the [NEW] button.- Bring up "Special" on to the floating area (easier here), and populate with buttons from the Customize area for instance.
- You will assign a macro to each button.
- Now to edit each button.
- Right-click on the button on the "Special" toolbar, and edit it.
- After you have finished editing, save.
- After you have the button edited and the macros assigned, you should hide the "Special" toolbar so that nothing bad happens to it. You can use the [x] to hide, but be very careful not to move buttons off of it.
Buttons can only be moved from one tool bar to another or deleted by moving off the toolbar when working with toolbars. Be careful or you could lose your buttons.View --> toolbar --> CustomizeAn entire toolbar can be moved or hidden at any time.
- You are now ready to use the "Special" toolbar to add buttons to existing or new toolbars.
Creating Custom Buttons on Excel Spreadsheet
Wingdings will not look right in Firefox 3.
A B C D E F G H 1 H I ñ ò 1 2 3 Q Toolbar buttons are 16 x 16 pixels on PCs (20 x 20 on MAC).You can create custom buttons using your spreadsheet by pasting any image to the button. Example to create an icon from a spreadsheet cell: Use a pointsize of 36 to make things easier, and move the borders so that the cell is absolutely square. Copy the cell (Ctrl+c), (you do not even need to convert it to a picture).
Right-click on toolbars area, custom, place a picture on the toolbar, Paste Picture will copy your cell picture or other picture in the clipboard over the top of the picture on the toolbar.
Custom Buttons reassigned for Testing (#customrt)
I have some custom buttons [Q] [1] [2] [3] [<>] which I keep reassigning macros to for testing.
Reassignment is real simple. right-click on toolbars, customize, right-click on button [1], reassign macro, exit custom.
Even though XL2000 makes adding tooltips simple, these buttons are only for testing so I do not bother putting descriptive tooltips on them during customize.
Put a descriptive Name on that Custom Button (#customdn)
**Top of Column** **Insert Row** **path in Lfoot** In XL2000 placing descriptive tooltips on buttons is greatly simplified. It is as easy as reassigning a macro since it is on the same dialog. right-click on toolbars, customize, right-click on button, change the descriptive name: ___ in white box, exit custom.
Instructions for XL95 and XL97 follow.
You can place a descriptive name (tool tip) on the button that can be seen when passing the cursor over the button by running a single-use macro. You must include the name of the toolbar and you must supply the position of the button on the toolbar and blank positions on the toolbar must be counted. If the description disappears between buttons there is a blank that must be counted. Because of the difficulty in accurately counting positions, make a note of the other tooltip comments and change your own one at a time. I have commented mine out after use to avoid problems later. If you cannot see the tooltips see HELP. (view --> toolbars --> show tooltips)
To find out the toolbar name click on the space in the toolbar group beside a toolbar button -- the name will show on the Status Bar (lower left corner where Ready normally appears).
Markbuttons is simple code but Bill Manville has a much better solution (1999-02-08)for XL95 that displays each button and allows you to change it, and points out that in XL97 you simply use View / Toolbars / Customize / right-click the button and change the name. Excel 2000 provides for tooltips on your buttons within Customize.
Macros, some of the short macros used with Toolbar buttons on this page (#macros)
Sub Markbuttons() 'Application.Toolbars("Toolbar 4").ToolbarButtons(1).Name = "**Top of Column**" 'Application.Toolbars("Toolbar 3").ToolbarButtons(1).Name = "**Insert Row**" 'Application.Toolbars("Auditing").ToolbarButtons(13).Name = "**path in Lfoot**"" End Sub Sub GotoTopOfCurrentColumn() Cells(1, ActiveCell.Column).Select 'J.Campion 2000-03-20 End Sub Sub GotoBottomOfCurrentColumn() 'Tom Ogilvy 2000-06-26 Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select End Sub Sub SelectToBottom() Range(ActiveCell.Address, _ Cells(Rows.Count, ActiveCell.Column).End(xlUp).Address).Select '-- copy selection to to clipboard Selection.Copy End Sub Sub DownToBottomOfBlockAndActivate() 'will give a better name if I learn why this was wanted. Range(ActiveCell, ActiveCell.End(xlDown)).Select Selection.Item(Selection.Count).Activate End Sub Sub gotolastnotlen0() Dim lstrow As Long, i As Long 'D.McRitchie 2000-12-04 prog. lstrow = Cells(Rows.Count, ActiveCell.Column).End(xlUp).Row For i = lstrow To 1 Step -1 If Len(Cells(i, ActiveCell.Column)) <> 0 Then GoTo done Next i done: Cells(i, ActiveCell.Column).Select End Sub Sub MacroDialogBox() 'Application.SendKeys "^%{F8}" Application.SendKeys "%{F8}" End SubBy the way the [Home] button will return you to the leftmost cell on a row, providing you haven't invoked Transition Navigation Keys. VBA code would be
Cells(ActiveCell.Row, 1).SelectSomething similar to navigating to the topmost,bottommost,rightmost,leftmost cell in that column or row is double-clicking on a cell boundary which will move you in that last cell in that direction before it hits a boundary or blankcell.
An example on my Slow Response page that avoids changing the active cell (efficiency) uses the following code:
Cells(Rows.Count, Range("A1").Column).End(xlUp).Offset(1, 0).Value = "** New Entry**"Place the cursor on the cell below the last entry in column A
cells(rows.count,1).End(xlup)(2).Select
Information on Existing Toolbar Button [XL95]
Pass cursor over the button to see the Tool Tip.View the macro behind the button (#viewmacro)
right-click on button, choose Toolbars; then right-click on button choose Assign Macro, which will show you which macro you have already assigned.If you delete the macro but want to keep the button, move the button to your special (hidden) toolbar. If you do not move it off and not into a toolbar it will be lost forever.
Change the button image (#changeimage)
right-click on button, choose Toolbars; then right-click on button choose Edit button.Menu and Tool Menu [#menu]
Putting the macro into your Tool menu, Pertains to XL95 .
For XL97 and XL2000 see topics Toolbar and Menu examples for XL2000 a section specifically rewritten for XL2000 and at the very end see Related Articles, Specifically relating to Menu and Menus below.
Under Tools --> Macro --> (list) -- after selecting a macro there is an options button that allows you to specify a shortcut. It also allows you to add the macro to your Tools menu. I identify my material with an asterisk in front so that it doesn't look like the professional and shipped Excel options.
Elimination of a shortcut or toolbar menu option when the macro has ceased to exist or has been moved. Tools --> Edit Menu -- that should be enough to get you started -- this option available only when viewing a macro sheet (VBA). You can change the associated file, macro, description, or delete the menu item. Also see Creation of Shortcut keys spreadsheet.
Additional information in HELP -- Deleting and restoring menus and menu items
Comments (Tool Tips), Pertains to XL95 . (#tooltips)
< One of these will work for you.
Right-click --> Insert comment
View --> Insert --> comment
Insert --> Comment (XL95)The following have options you may be interest in:
Also Tools --> Options --> View
File --> Page setup --> Sheet
desktop --> Control settings --> Display --> Appearance --> tool tips
Toolbar and Menu examples for XL2000 (#xl2ktbm)
Changes have been made to XL2000 such that menus are created and changed to work same as adding macro buttons in previous versions. Additional information on buttons is scattered throughout this page above and below this point.More information on XL2000 menus can be found in related area. Items are added to ../icons/toolbar and to Menus via
Customize, Commands, Macros
(you can copy these 16 bit x 16 bit buttons designed for PCs)
Toolbar Button Assignment I created for use in navigating in XL2000
Several of the macros to go with these buttons were included above.
- personal.xls!InsertRowsAndFillFormulas
- personal.xls!GotoTopOfCurrentColumn (macro is shown above)
- personal.xls!GotoBottomofCurrentColumn (macro is shown above)(also see a worksheet solution)
- personal.xls!PutFileNameInFooter
- are assigned temporarily for testing
- List Subs and Functions personal.xls!ListFunctionsAndSubs [code]
- additional reassignment option
- personal.xls!MacroDialogBox (macro is shown above)
- GoToSub (on BuildTOC page), brings up module containing macroname (or function name) displayed in the active cell.
- Backup by Date personal.xls!backupBYDATE
- Excel to HTML (xl2html) Excel to HTML with col/row headers (xl2html)
- personal.xls!MakeHTML_Link from newsgroups Message-ID: line.
- personal.xls!decode_html_text, convert plain text so it can be printed in HTML,
converts HTML tags and tokens and CRLF codes (from clipboard, to clipboard) (code)- navigating to the Previous and Next sheets are described in BuildTOC,
Also see Return to Previously Selected Sheet and Code for GoToNextSheet and GoToPrevSheet.- Euro (€), See below, there is an addin described in Excel HELP) used like Dollar [$] button.
- CharMap, see below (used in “My Tools” personal menu instead of toolbar)
- ClearConstants, demonstrates simple macro and installation of a toolbar button.
- DeleteThisSheet, sheetname "sheet", no macro code within
Install toolbar button in Excel 2000 (« within Customize «):
- Right-click on toolbar area (View -> toolbars --> cutomize --> macros)
- Customize, commard (tab), macros
- Drag the Custom Button to it's place in the proper toolbar.
Note the toolbar area holds many toolbars. Each toolbar can contain several toolbar buttons.- Change the image on the toolbar by right-click on icon in the toolbar (still within customize)
- Assign image -- you can copy and paste any 16x16 bit image (20x20 on Mac) such as one from the topic above, or simply select one from the Excel 2000 selection.
A small selection of additional buttons in XL2000 can be found at Right-click on toolbars, Customize, Right-click on existing button image, Change Button image withi the customize menu. A list of menu items. Tool bar buttons, faceids, used in a workbook can be documented by the CBlist addin by John Green.
VBA code would look something like: (Rob Bovey)
CommandButton1.Picture = LoadPicture("C:\Files\MyPicture.bmp")Also see Related area at end of this web page.
- Tool Tips (descriptions) are a lot easier in XL2000 , simply click on button while in customize and retitle in the white name: area. (shortcut: Right-click on button or toolbar area, Customize, Right-click on button).
Editing your Menus in XL2000 (#xl2kmenus)
You may note some similarities between menus and toolbars and buttons in Excel 2000, and that is because they are the same in Excel 2000, differing only in appearance, and yes you can make one look like the other.
All changes are done under Customize, which you can get to by either
Continuing with building Toolbar menus.
- Tools -> Customize -> Commands -->, or
- Right-click on the toolbars area
- New Menu can be dragged to toolbar/menu area by choosing Macros on left (categories:), then drag the Custom Menu Item from the right side (Commands:) to the tool bar menu you selected.
- New Menu can be renamed by Right-clicking on the New Menu on the toolbar like you change a button
- Or choose and existing menu item, on toolbar with Builtin Menu.
- You can drag another "New Menu" to the grey box under previous "new menu"
- You can drag a "Macros, Custom Menu Item" to a group.
- You can move items up/down within a menu by dragging
- You can add a faceid if you like, by Right-clicking on the menu item while still in Customize.
- You can remove/eliminate any menu or item by dragging to the spreadsheet while in Custom.
Tools (menu) My own Customizations in XL2000
I sometimes like to place an asterisk in front of my menu items so they stand out from those that came with Excel, and other canned menu items.A list of my own menus and the macros assigned to them can be seen in Barhopper -- fixup for Restored Toolbars, and -- Listing of Menu Items, the code, and a worksheet version.
- * List Subs and Functions - to $ListSubs$ sheet (see buildtoc)
'h:/excel2k/LISTSUBS.XLS'!ListProcedures- Find Links - John Manville/Steve Bullen’s site (download),
(a macro probably similiar to the above was posted by Gary Brown on 2000-05-06)
'H:\downloadh\Bullen\FINDLINK.XLA'!FindLinks- Char Map (see example and code in symbols.htm#charmap)
personal.xls!showCharMap- * Mark SepAreas -- ID cell with own address* (code)
personal.xls!MarkSepAreas- * MarkCells -- ID cell with own address* (code)
personal.xls!MarkCells- * FormulaBox [Ctrl + n] (code)
personal.xls!FormulaBox- * Run from Active cell (RunSubFromActiveCell)
- * GOTO (cell, html, sheet, SUB) -- especially useful for testing
- Goto Cell (GoToCell)
- Goto HTML (GoToHTML)
- Goto Hyperlink (GoToHyperlink)
- Goto Sheet (GoToSpecificSheet)
- Goto Sub (GoToSubOrFunction), documented in BuildTOC
Creating a Euro toolbar button like the Dollar Sign ($) toolbar button (#euro)
Using the same format as would be used on the Dollar Sign button, but substituting the Dollar($) sign with the Euro(€) we have a number format for the macro.Sub Euro_Format() Selection.NumberFormat = _ "_(€* #,##0.00_);_(€* (#,##0.00);_(€* "" - ""???_);_(@_)" End Sub
Creating an icon button from a Euro [€] character or any other text
While the instructions here may prove useful for other purposes, have discovered that there is a HELP topic on this Entering, displaying, and printing the euro sign which includes a hyperlink to an addin that works like the [$] button, and although I didn't suceed in installing the addin described, I did copy the Euro button [€] from it, and make some slight changes. (You can copy the icon from this page if you can't install the addin)Whether you copy a cell or an image, the image will be resized to 16 bits horizontally and 16 bits vertically. Note we want a stylized elongated Euro character.
Prepare button image
- Select a cell, choose font size of 10 as the most font design work usually goes into 10 point fonts. Set the zoom for the spreadsheet at 200% for visibility.
- Place the Euro character into the selected cell Alt+0128 (Note in HTML you should use € not Microsoft character €)
- Format cell, alignment, center both vertically and horizontally.
- Snugly fit the cell borders to the cell but make the cell taller than it is wide, so that the conversion to an icon will elongate the character horizonally when it makes it 16 x 16 bits on PCs (20 x 20 on MAC).
- Copy the cell (Ctrl+C) to the clipboard.
- It is not necessary to make this a picture, although pictures also work.
Create the toolbar button «
To create/change the button view, toolbars, customize, or right-click in toolbar area then customize, next create the button by going to command tab, then macro, and dragging the Happy Face to the toolbar. Right-click on the new button, paste button image.
Obtain toolbar buttons from program .exc and .ico files (#ico)
- Icon Explorer obtainable from ZDNET installs directly into library it is unzipped in (h:\downloadh\iconExplorer). Change settings to from file instead of from folder. Wants a diskette in drive A:. Select the folder or file. Copy picture from display and paste into "Paste Button Image", some have to be edited afterwards.
http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=00125B&b=pcm [broken link: search ZDNET for icon explorer]- Icon Sucker 2 « [http://www.copseystrain.com/iconsucker/index.html] (tested 2003-09-21) You have to go through the file menu to get to the file, can't paste path into program. Image to clipboard or to .bmp or .ico file. { icosuck2.exe}
- IconViewer 1.1, http://downloads-zdnet.com.com/3000-2195-3186283.html?tag=lst-0-14 [not found]
nice viewer but copy to clipboard or save icon not implemented yet.- IconXTractor 2.304, [http://home.tiscali.de/kurtzimmermann/iconxtractor_e.htm] [LockerGnome], save as a file, but not to clipboard. Use Filter with All Files(*.*), Good for documentation. Save as .bmp, .jpg, .ico { iconxtractor.exe}
- Softinabox Icon Explorer 2.4 , $15, http://downloads-zdnet.com.com/3000-2192-10107414.html?tag=lst-0-1
- Create A Desktop Shortcut, Robert Bruce, http://www.analytical-dynamics.co.ukdefault.aspx?section=developer&page=home, Some additional comments, http://groups.google.com/groups?as_umsgid=%23hs91mXLCHA.2228@tkmsftngp08
- Favicon Generator, Salvatore Sanfilippo, generate single letter with background, or up to 5 letters across top and across bottom for a favicon. Additional links for creating favicons on my Excel to HTML conversions page.
Test the above programs that get icons from .exe, .dll, .ico (#tstico)
Test getting icons on your system
- Directories
C:\Program Files\Microsoft Office\Office
C:\Documents and Settings/Administrator/start menu/Programs
C:\Documents and Settings\Administrator\Desktop- Google Searches for Retrieving Icons -- using Google toolbar
icon viewer icons clipboard
icon.explorer zdnetScreen Captures / Screen Capturing Software (#scrcapture)
- Screenrip32, freeware screen capture utility that includes capture of the mouse cursor with a variety of methods. ICO, BMP, JPG, and GIF support (animated or standard).
- Hyperionics HyperSnap, Screen Capture, renewable weekly lease available if you want free usage.
- Additional choices ... (see XL2GIF and Manipulations such as SnagIt
Viewing your bit maps or other picture files (#irnfarview)
- IrFanView 3.91 «, by irfan skiljan, is the best for viewing raw images (everything but .max files). You can view in full screen (enter), You can rotate temporarily (R | L) or permanently, and zoom in (+) and out (-). Be sure to download both the program and the plug-ins. To convert to send as email or smaller pictures: Batch conversion, input directory: C:\camera_..., (select images, add), output directory: C:\temppix\, batch conversion, advanced options: width 800, 50% width & height, 75 DPI, 16.7 million colors, START. [more information), { i_view32.exe}
Additional Features of Standard Toolbar Buttons (#painter)
- Paintbrush ("Format Painter") can be applied multiple times by double-clicking, and turned off by clicking on any toolbar button. The large plus next to the cursor is probably a tip-off of this feature. For a macro see Pasting Formats, as in Format Painter in paste.htm.
Status Bar (see my Formula page)
For layout and information on Statusbar see Status Bar. There are some features for adding up cells, or counting cells, in the selected areas which is why this information is located on the Formula page.
Repair Renamed Pathnames on Menus and Toolbar Buttons
Bernie Deitrick, misc, 2002-04-16, supplied a macro, RepairUserDefinedButtons() to Repair pathnames involving reassigned personal.xls that get modified when redoing systems or Excel versions. The macro saves work having to change assigned macros on menus and toolbar buttons when the path to xlstart\personal.xls changes due to system and or Excel version changes.Please see updated version of code to handle multiple levels and provide better documentaion. Also check out Barhopper -- fixup for Restored Toolbars, and -- Listing of Menu Items (barhopper.htm).
System Related Toolbars (not Excel)
Clean up desktop by putting desktop icons into a toolbar to unclutter desktop.
To move the windows taskbarmpty area on the taskbar, and then drag the taskbar to a different location on the desktop. (bottom, right, top, left)
Related (#related)
Microsoft Technical Support -- Knowledge Base
Access Microsoft's Knowledge Base, Troubleshooting Wizards, and downloadable filesMicrosoft Technical Support--Support Options (http://support.microsoft.com/support/a.asp?M=S)
Example:
- Search for is about: Excel for Windows
- I want to search for: excel and XL95 and toolbars
- MSKB 112632 XL: Setting Status Bar Text and ToolTips for Toolbar Buttons
- MSKB 161235 XL97: How to Use a Toolbar Settings File from a Network Share
- MSKB 126895 XL: Macro to Change the ToolTip Name for Custom Toolbar
- MSKB 141688 XL: Visual Basic Macros to Add or Delete a Custom Menu
- MSKB 159466 List of IDs for built in command bars « (for XL2000 see MSKB 213552)
- MSKB 159619 Sample macros to control menus and submenus
- MSKB 161926 XL97: How to Place a Checkmark Next to a Menu Item
- MSKB 166755 *Customizing Menu Bars, Menus, and Menu Items*
- MSKB 170563 OFF97: How to Prevent Customization of Menus and Toolbars
- MSKB 193006 - HOW TO: Reset Personal Menus in Office XP and Office 2000 Programs, (.PIP files)
- MSKB 211543 XL2000: Cannot Modify or Delete Custom Menus
- MSKB 213209 XL2000: Sample Macros that Customize and Control Shortcut Menus
- MSKB 213211 XL2000: Sample Macros to Return ID for a CommandBar Control
- MSKB 213550 XL2000: Sample Macros for Customizing Menus and Submenus
- MSKB 213552 XL2000: List of ID Numbers for Built-In CommandBar Controls « (Menu Items)
- MSKB 286460 HOWTO: Set the Mask and Picture Properties for Office XP CommandBars
- MSKB 287037 XL2002: Custom Menu Causes Irregularities in Standard Menus and Toolbars. Misplacement of Caused by using an old Toolbars (.XLB) that does not support new feature such as Speech. Unfortunately the solution is to RESET toolbars and start over.
- MSKB 288771 HOWTO: Create a Transparent Picture For Office CommandBar Buttons
- MSKB 830502 XL97: *Customizing Menu Bars, Menus, and Menu Items* -- replaces 166755
Related Articles found elsewhere
- Templates<>
- Auditing Toolbar (evaluator), also use of the Watch window for auditing
- Attach Custom Toolbars to Microsoft Excel Workbooks and Templates -- http://www.microsoft.com/exceldev/articles/toolbatt.htm [Alt if not found]
of interest in distributing a workbook or template to users with attached toolbars.- Attach Custom Toolbars with your own designed icons 2003-12-10, programming, Colo
- Attach a Custom Toolbar of your own 2004-03-10, Bernie Deitrick and also 2006-01-20.
- Available at John Walkenbach's site Button Faces Scroll about 2/3 down and look for "Button Faces." (56k); This file is for Excel 5/95 from Douglas A. Jankuski -- two toolbars become available "100 Button Faces" and "Custom Toolfaces" while the Excel file is up. You can add them to your own toolbars at that point. Also check out his Excel Developer Tip Archives page, look for words like Commandbar and formula.
- Backup, Always Take Backups, backup should include your *.xlb file.
- Create Addins, Jan Karel Pieterse, a series of articles from creating a macro, creating an addin, creating menus, distributing addin, macros, and menus ready to use.
- Grayed Out Menu Options, and also see Things that can prevent response, keying in data
- Shortcut menus, adding to, this particular modification allows for pasteing formulas unchanged, Chip Pearson via Drew Paterson -- 2001-04-13 misc. Also see Event macros page. Chip's original posting, 2000-05-02, Functions.
- List of menu items, tool bar buttons, faceids, used in a workbook can be documented by the CBlist addin by John Green.
- Command and Menu Bars, creating with code:
http://msdn.microsoft.com/library/techart/ofcmdbar.htm -- Additional links as provided by Tom Ogilvy 2000-12-28, <up730PNcAHA.1708@tkmsftngp03>- An article on distributing applicatons:
http://www.microsoft.com/officedev/articles/addins97.htm- Toolbar Button Style Guide -- Designing buttons for Internet Explorer
http://msdn.microsoft.com/workshop/browser/ext/overview/toolbar_style.asp- MSKB 830502 - How to customize menus and menu bars in Excel (replaces DP1758 (XL95), DP2586 (XL97) articles)
- Build Table of Contents (BuildTOC) and other documentation for workbooks.
- Jon Peltier's Web Site, Jon Peltier, sample workbooks for floating toolbars, and one more worksheet that displays the 3000 toolbar icons.
- Shortcuts, clicks, in Excel and other applications: Right-click: Excel, IE; Short Cuts (keyboard shortcuts): Excel; IE, OE, Win2000; Toolbars: Excel (this page); Drag/Fillhandle: Excel Fill Handle, Windows drag files; Accessibility Options: MouseKeys; Event Macros: Excel
Related Articles, Specifically relating to Menu and Menus
In XL97 and XL2000 menus are treated more like custom buttons, and yes you can still add menus, and menu items manually. Because menus and custom buttons are now related the following list repeats some references already mentioned; likewise, some already mentioned related articles which are of interest and some MS KB articles mentioned later are not repeated below. John Walkenbach's "Menu Maker" makes arranging a menu with categories and button faces on menu items a lot easier.
- See Excel 2007 Ergonomic Hell, A not so smooth conversion to Excel 2007 from previous versions. Restoring use of your own menus accessing your own macros by customizing the Quick Access Toolbar.
- See Editing your Menus in XL2000 above for manual changes. [Personal Menu Items]
- Entering a Description for the Function Wizard: in XL2000
- Colors, information on colors, including changing the default fill color for a workbook by changing the color palette.
- Menus (related: Toolbars, BuildToc)
- Menus and Command Bars , Jon Peltier
- Disable command bars and controls, Ron de Bruin
- Excel Window, Workbook Window, Worksheet Window, move, restore, minimize, maximize, close
- Menus Excel 97 and Menus Excel 2000 «, both by Kevin Pedersen (descriptions and pictures of menus, all on one page)
- User Interface «, Nick Hodge, Menu Topics: File, Edit, View, Insert, Format, Tools, Data, Window, Help
In order to understand Excel you should be familiar with all of the menus and options. These are new pages and so far will guide you through the File through Format menus. (each menu described on their own pages)- Where can I find the menu commands in Excel 2007, Ron de bruin
Xtreme Visual Basic Talk - View Single Post - Excel FAQ - Excel 101, Code to allow you to add a CommandBar (floating/dockable toolbar) in Excel Microsoft Menu Links, posted by Tom Ogilvy Fixing references in Toolbars (.xlb) and menus «, Bill Manville,
fixup using recursion after new system or Excel changes location of your personal.xls macro library
List of menu items, tool bar buttons, faceids, used in a workbook can be documented by the CBlist « addin by John Green to create into empty sheets: 1) list of command bars with it's listable controls (Caption, Type, Face Image, Faceid), 2) Face Images and Faceids, 3) command bars and buttons (subset of 1). Identifying FaceID Values for CommandBar Images (Tip 67) «, John Walkenbach, addin will identify faceid number when you mouseover an icon. Barhopper -- fixup for Restored Toolbars, and -- Listing of Menu Items, the barhop, barhopper, and barhopper_ws macros document toolbars containing "Tool" as part of the name and which are not builtin menus. Listing shows menu title, the macro invoked, and the macros location. AN=558547193 It is still possible to edit the menus in XL2000, it is done very similar to creating buttons and assigning macros to tool buttons, except it is done on the menu. Look for Chip Pearson's, Patrick Molloy, and David Hulme's comments in this thread. Right-click Menus (also see Right Click Menus (Context Menus) in Excel on my site.
- Customizing Your Right-click Menus, David Ringstrom (msofficemag formerly OfficeVBA.com), Customization of both the "Cell" and "Ply" commandbar menus, (sample code).
- Setting up a right-click menu, replies by Bernie Deitrick and Paul B., examples
- Listing right-click menus see right-click menus on collections page.
Shortcut key Alt+F8 or using a Tip by Geoff Taylor place the Run Macro on your toolbar equivalent to use of Tools --> Macros --> Run. so that one can see the list all available macros, which are available for editing as well as executing. Directions in XL2000: Right-click on menu area, Customize, Tools, Macros... drag Macros... to toolbar and then Right-click on the button and rename it as "Run_Macro". Faster alternative is the use the shortcut Alt+F8. BET: Excel - Toolbars &\1 Menus, Clearly lists each toolbar button [and real curious why the directory names of this site are so long] Toolbar Paint v1.2.0.2, small and powerful paint package that is specifically targeted at developers who wish to design their own toolbar button graphics. [LG 2003-10-07]. Note Excel icons are 16x16 on PC. and Excel has it's own button editor. MS KB papers
- ofcmdbar, Command and Menu Bars [using VBA code] -- Additional links as provided by Tom Ogilvy 2000-12-28, <up730PNcAHA.1708@tkmsftngp03>
- Adding your own toolbars
MS KB articles
- MSKB 830502 - How to customize menus and menu bars in Excel (replaces DP1758 (XL95), DP2586 (XL97) articles)
- MSKB 213552 -- XL2000: List of ID Numbers for Built-In CommandBar Controls, Menu items
Attaching Toolbars postings 2006-01-20
This page was introduced upon opening on January 1, 1998.
[My Excel Pages -- home] [INDEX to my site and the off-site pages I reference]
[Site Search -- Excel] [Go Back] [Return to TOP]Please send your comments concerning this web page to: David McRitchie send email comments
Copyright © 1997 - 2004, F. David McRitchie, All Rights Reserved