Is it possible to decompile compiled Visual Basic programs?



Read and add posts to the Visual Basic 6.0 Forums

Download some of my programs and OCXs

Read the Tips here

The old style forum is still available here




From: Mark Smith
Date: Thursday 21 April 2005 11:37 AM
Subject: vb6 exe decompile
Question: I assure you I am not a hacker. I had my laptop stolen on monday with the source code for two vb6 projects I have been working on (no backup, my fault).

I came across your entries on the web regarding extracting exe files back to vb6 source code.

Do you have a copy of the extraction program and if so, could you send me a copy ??

It would be much appreciated.


Answer by Martin Allen:

The short answer is no.  Unfortunately there is no way of retrieving Visual Basic 6.0 source code from a compiled program.  This quote from my old forum explains that it maybe possible if the program is compiled in P-Code:

"yeah you can decompile vb 1 - 3 apps as they just used P-Code now we all compile to Native Code, which means it is no long interpreted. Thus decompiling is impossible unless you convert it to asm and hatch up some nasty nasty Vb code from that. The moral being don't compile to P-Code."

Beauty Of Baud on Thursday, January 30, 2003 at 16:58

There is a programs available such as VB RezQ, which extract the structure of the program, but as mentioned above, it is not possible to extract the source code:

"Note: VB RezQ produces empty subroutines - it does not recover the Basic code within events, functions and subroutines."

Taken from

Another thread from my old forum might be of interest: decompiler.  Message 8 by Ruturaj explains more about VB RezQ and the moral implications of a decompiler:

"Guys , don't expect the Decompiler of VB. I hope it will never come in existance. After all I'm also a VB programmer and programming to earn money. I don't want such tools in market to get my source code out of my Exe.

If you want it to Crack the software ... please don't do it and respect others and their hard work.

If you want it because you've lost the source code ... forget about it and start working on new one ... and from today onwards ... don't forget to take BACKUP of your work every day ! ;)"

Ruturaj on Sunday, December 7, 2003 at 13:43

Martin Allen 1999 - 2011.  Last updated Thursday 11 August 2011 08:09:15 PM +0100.