Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference VBP for debugging

Status
Not open for further replies.

markphsd

Programmer
Jun 24, 2002
758
US
how would i reference a vbp dll file in Word so that i can test and debug the code in the word file and the dll at the same time.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
You need to compile the dll, register the dll, then add it as a Reference.

Seems like an odd thing to do. If you find any errors in the dll, then you have to compile it again, and register it again.

You should be able to do all your debugging when you are working on the dll.

You can not reference a project itself. Word (or any other application as far as I know) can only reference a registered dll.

Gerry
My paintings and sculpture
 
I need to debug the application and the DLL at the same time. So when i step through the code of the application i need to jump into the code of the dll. I've seen it done before i just don't know how.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
When you find out how, please post it here.

You don't state what the real issue is, but any DLL I have created for Word - I debugged in VB. You can use the application (Word) while you debug, so I am not seeing what the issue is really.

Are you saying that you want to use calls to the dll (from Word) while debugging?

Again, if you are saying you have seen use a DLL that is NOT compiled, NOT registered, and NOT referenced...please post here.

Again, AFAIK Word can not use a DLL that it has no reference to, and it can not make a reference to an uncompiled and unregistered DLL. I don't even see how you can call it a DLL if it is not actually registered as a DLL.

AFAIK, Word can not directly reference a DLL project.

Can a DLL project reference Word? Sure, of course it can. So if you are debugging a project, you can create and use Word instances.

Perhaps if you clarified:
I need to debug the application
I am not quite sure what you are talking about there.

Gerry
My paintings and sculpture
 
Okay,

I'll just describe what i've seen.

While in word vba i have referenced a dll.

I have used a function or class from the dll. I had both the compiled/registered dll on my computer, and the vb project.

When i wanted to test the word document's code, i could step through it, and when it would use a function from the dll, the function would jump to vb and walk me through the referenced function.




Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
While in word vba

and

When i wanted to test the word document's code, i could step through it, and when it would use a function from the dll, the function would jump to vb and walk me through the referenced function
my italics.

I must be very dense. Are you saying that while in Word VBA if you step through code, and that code uses a function in a DLL, that somehow VB (not VBA) is executed and loads the project?

I have never seen this. I have made DLL's for Word, and have stepped through code in Word that uses the DLL, and I have never had VB execute and load the project that created the DLL. Ever. So, again, I would be very interested in hearing how that could be done.

Gerry
My paintings and sculpture
 
Yes that's what i'm saying.

Instead of referencing the DLL you are referencing the project. By doing that when you call a function it will jump to the VB Editor and allow you to edit the what will be later compiled as the dll. It's extremely helpful. And i have seen and done it, problem is, i didn't set it up.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top