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

jasmith4

Active Member
Joined
May 16, 2008
Messages
337
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?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top