Solved

How to debug an ActiveX VB6 DLL faster?

Posted on 2012-03-30
3
355 Views
Last Modified: 2012-04-13
HI

I am developing some DLLs based on VB6 ActiveX and in my short experience on this I feel I can´t debug it quickly as I want.

I do the following:

1. create code.
2. compile it.
3. Register it, and then try it with the final application.
4. If it has errors I go back to the point 1.

I use msgbox to trigger some "errors" and finally get some clue but this is pretty slow process, I wonder if there is a debugging way just like .exe apps.

Thanks.
0
Comment
Question by:dimensionav
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
vb_elmar earned 250 total points
ID: 37788224
VB can return the line where the error appeared. You can set a Stop command (see sample below), then VB stops and shows the Sub where the error appeared. In the sample below it's possible to go to the variable "a" (using the mouse cursor) . -VB shows you the value of "a" in a "tooltiptext".

Private Sub Form_Load()
On Error GoTo 12
4: Dim a As Long
6: a = "Hello"
8:
10: GoTo 14
12: MsgBox Erl: Stop
14:
End Sub
0
 
LVL 46

Assisted Solution

by:Martin Liss
Martin Liss earned 250 total points
ID: 37788294
There's an article in VB6 help called 'Creating ActiveX Components' that will lead you step by step through the process including debugging.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 37843287
Glad I could help. In my profile you'll find an article I wrote about debugging VB6. It doesn't deal with dll's but you may still find it of interest.

Marty: MVP 2009 - 2012
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 60
VB 6.0 printer how to align 6 67
Hide vba in gp 7 104
Error with a code discussed on this page 5 32
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question