Installing Visual Basic 6.0 on Windows 7

clive All, Development, Tech Tip

If you have a legacy application written in Visual Basic 6.0, you will find it difficult to install Visual Basic 6.0 on recent versions of Windows (Vista, Windows 7, etc) to let you maintain/modify it.

Here’s what you need to do to get going:

– Get Visual Studio 6.0 (which contains Visual Basic 6.0)
– Create an empty file, in c:\windows\system32, called MSJAVA.DLL
– Install Visual Basic from the Visual Studio disks, but only the minimum components to get Visual Basic operational. It will take a while to install.
– Remove MSJAVA.DLL

Why? When you try and install it without messing around with MSJAVA.DLL, the installer will try and install Microsoft’s *very* out of date Java implementation. You do not want this, and it is not necessary, but the installer has to be tricked into thinking it has already been installed to proceed.

Once the installation has completed, remove MSJAVA.DLL before Windows Update tries to *really* install MS Java.

[[[ Credit for this tip to here: http://www.vbmonster.com/Uwe/Forum.aspx/vb/33424/VB6-on-Windows-7-64-bit , about half way down the page ]]]

You could of course also set up a Virtual PC on Windows 7 if you’re not running the Home Edition.