How to debug an add-in's VBA code?


Active Member
May 16, 2008
I have my own Access-2003 database that I publish as an add-in, so other than the compulsory USysRegInfo table it has nothing but lots of VBA code, mostly information-gathering utilities applied to the current database. I publish it by saving it as an MDE, closing Access, and renaming the MDE as MDA -- really Microsoft?

Now I want to use these utilities to gather information about some other database, so I need that one to be current. First I close Access and use Explorer to delete the old MDA from %APPDATA%\Microsoft\AddIns -- REALLY, Microsoft? Then I open Access and use the File/Open dialog box to navigate to the other database's folder, select the database, and use the Open button's down-arrow to open it read-only and shareable with the Shift key held down so nothing auto-executes. Finally I use the Add-In Manager to install the MDA, and now I see my menu of utilties under the "Add-In Manager" command (and I now know a copy is in %APPDATA%\Microsoft\AddIns).

But one of the utilities gives me an error, so I hit Alt-F11 to view the code, and the MDA's code is unviewable! So how am I supposed to step through it -- with the OTHER database current -- to find bugs? I've tried installing the MDE, but the VBE doesn't even have an entry for it in the Project Explorer -- REALLY, MICROSOFT???

Or am I just going about this all wrong?

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...