‘Run-time error 1004’

If you get the error “Run-time error ‘1004’: Programmatic access to Visual Basic Project is not trusted”, follow these steps (or equivalent steps in your version of Excel – the steps below are for Excel 10):

  1. Select File > Options.
  2. Select Trust Center > Trust Center Settings.
  3. Select Macro Settings.
  4. Check “Trust access to the VBA project object model”.


Postal Codes with Leading Zeroes

If you enter a postal code with a leading zero (e.g. 08540) Excel may interpret it as a number and remove the leading zero. To correct this problem, either type an apostrophe in front of the postal code (e.g. ‘08540) or format the field as text (“Text” category of the “Format Cells” command).


Converting Minutes to Hour:Minute Format

The DriveTime function returns the drive time between two points in minutes, but sometimes it is convenient to see the time in hour:minute format. To display drive times as “days hours:minutes” in Excel, you must first convert minutes to days by dividing by 24*60.  For example:

=DriveTime (A2,B2)/(24*60)


‘The INI File Was Not Found’ Error

When loading the Add-In for the first time, this error may sometimes appear. Exit and re-enter Excel.


‘Sub or Function Not Defined’ Error

When making calls to PC*MILER|Spreadsheets from a macro sheet, you may see this error message. To fix the problem, from the Tools menu select References and make sure that pcmsrv.xla is checked on.


‘-1’ Error

This error occurs when the user enters a location (postal code or a city/state place name) that is not a valid PC*MILER location. 


Problems Using Custom Routing From PC*MILER

If you have problems using custom routing that you created in PC*MILER, set the value of the following item in the PCMSERVE.INI file to TRUE. The PCMSERVE.INI file is located in your Windows or Winnt directory.

CustomRoute = TRUE


‘Error 1004: Programmatic Access to Visual Basic Project Is Not Trusted’

This error may occur when the user tries to open Excel after an older version of PC*MILER (Version 29 or older) has been uninstalled. 


The problem occurs because the uninstall process deletes the “AccessVBOM” registry key on your computer. This registry key grants permission to use our Excel Add-ins. This issue was fixed in PC*MILER Version 30, but uninstalling older versions may still introduce this bug.  If you are experiencing this problem, you can either: