A companion file is available: Click here to download

I created an add-in that displays a new CommandBar that functions as a simple calculator. It may not be the most useful tool (it's limited to only the four basic mathematical operations), and I'll be the first to admit that it's fairly ugly. But it does demonstrate some useful VBA programming techniques.

The code is too lengthy to list here, but the VBA project for the add-in file is not protected so you can examine it.

NOTE: This add-in does not work with Excel 2007.

Installation:

  1. Download the Toolbar Calculator add-in
  2. Start Excel and select the Tools - Add-Ins command. 
  3. In the Add-Ins dialog box, click the Browse button and locate calctoolbar.xla.
  4. Click OK
  5. The toolbar will appear
  6. Select Tools - Toolbar Calculator to toggle the toolbar on and off.

0 comments