Debugging Suggestions

T

Tim

Hi, Group.

I am looking for suggestions of the best way to debug the COM add-ins I am
writing for Excel. I have set breakpoints, but they don't execute in the
compiled dll. Am I missing something simple?

TIA
 
P

Phlip

Tim said:
Hi, Group.

I am looking for suggestions of the best way to debug the COM add-ins I am
writing for Excel. I have set breakpoints, but they don't execute in the
compiled dll. Am I missing something simple?

Did you put the complete path to Excel into the Project Settings Debug
Executable option?

At <F5> time (or the equivalent) you should get a warning that Excel has no
debugging code. Then your COM breakpoints will engage.

Also put a test spreadsheet on the command lines arguments in the Settings.

I debug my toolbar addin by saving this macro in my document:

Sub runTests()

'' find our toolbar and click on it

Dim q As CommandBar
Set q = Application.CommandBars("Foo Fighters")
q.Controls(1).Execute
Application.Quit

End Sub

Then I put the name of the document on the command line with /mrunTests.
That automatically launches the macro at start time.

(One closely guarded secret of the Office apps is they support command line
arguments. Good luck asking Clipit where they are!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top