Popular blog tags

How to install Microsoft Visual Basic 6.0 on Windows server 2016 step by step?


Table of content

1. Install Visual Studio6.0

2. Install MZ-Tools 3.0 for VB6

3. Install Smart Indenter v3.5 for VB6

4. Install  Rubberduck       --The best free VBA IDE developer tools

5. Install vs code


How to use

2. use  Smart Indenter v3.5 for VB6  format vb6  code

3. use  MZ-Tools 3.0 for VB6 Add line numbers for vb6  code

4. use rubberduck (http://rubberduckvba.com/) to sync my modules after editing them in VS Code.


Microsoft Visual Basic 6.0 install Summary

The steps I followed are below:

1.download Visual Studio6.0 ISO
2.unzip ISO
Install Visual Studio6.0
3.Run this program(Setup.exe) in compatibility mode and  as an administrator
4.disable some of Providers which will cause the installation to fail 
5.startup vb 6.0


To install the Microsoft Visual Basic 6.0 on Windows server 2016 


step 1:download Visual Studio6.0

Visual_Studio_6_Enterprise.ISO   size:613M

step 2:Extract the  file

unzip ISO to c:\tmp

Install Visual Studio 6

step 3:Install Visual Studio6.0

Prevent compatibility check interception


On setup.exe, change Properties, Compatibility to: Windows XP (Service Pack 3)

Go to the Setup folder we created on our Desktop and locate the file SETUP.EXE.  Right click on this file and choose Properties.  Select the Compatibility tab and check to box Run this program in compatibility mode for: and set the value to Windows XP (Service Pack 3).  

Also make sure you check the box Run this program as an administrator and press the Apply button. 

step 4. Run Setup.exe as administrator

step 5:disable some of Providers

Disable ADO, RDS and OLE DB Providers
Select Data Access and press the Change Option... button.  When the Data Access dialog opens, select the ADO, RDS and OLE DB Providers setting and make sure it is unchecked.  You will see a message that says the component is an essential part of the application, you can ignore this warning and press the OK button.  Leaving this option checked will cause the installation to fail on Windows 10.


step 7.startup vb 6.0

C:\Program Files (x86)\Microsoft Visual Studio\VB98\vb6.exe


Use line numbers in your source code

In Visual Basic, Erl, a Visual Basic  "global variable," gives you access to the line number of any erroring line of code. So by using line numbers and by using Erl in your error handlers, you can determine which line of code erred-wow! 

Less well-known is the ERL function which gives you the line number where an error occurs. Most developers don't use this because this function returns 0 if the crashing line isn't numbered.

The trick is to number all your lines before you deploy your application to your users. If you do that, the ERL function identifies exactly where a crash occurs:

Sub SampleErrorWithLineNumbers()

     Dim dblNum As Double
     Dim dblRnd As Double

10   On Error GoTo PROC_ERR

     ' Randomly crashes on a line below:
20   dblRnd = Rnd()

30   Select Case dblRnd
       Case Is < 0.2
40       dblNum = 5 / 0
50     Case Is < 0.4
60       dblNum = 5 / 0
70     Case Is < 0.6
80       dblNum = 5 / 0
90     Case Is < 0.8
100      dblNum = 5 / 0
110    Case Else
120      dblNum = 5 / 0
     End Select

130  Exit Sub

140  MsgBox "Value: " & dblRnd & vbCrLf & _
            "Error Line: " & Erl & vbCrLf & _
            "Error: (" & Err.Number & ") " & Err.Description, vbCritical
End Sub

return Error Line Number in vb6

step 1: Add  line numbers to you source code by  MZ-Tools 3.0 for VB6 add ins

Install MZ-Tools 3.0 for VB6

If you install the MZTools add-in to VB6, it has the ability to add line numbers in code to each line of each procedure / function / sub / etc.

Install MZTools3VB6Setup.exe


VB6 source line numbers

1000    Private Sub Test()
1010    On Error Goto Err1
1020        Dim I As Long, _ 'see how the line continuation has just one line #
                J as Long
1030        I = 1
1040        J = 0
1050        Print I / J
1060    On Error Goto 0
1070        'succeeded (unlikely)
1080        Exit Sub
1090    Err1:
1100        Print Erl 'will print 1050
1110    End Sub


Err.Number:9Subscript out of rangeeErr line:1250"

choice code in vb6 IDE  and right click mouse


Install MZ-Tools and then perform following steps On the menu bar, choose Tools > MZ-Tools > Add Line Numbers

install Smart Indenter v3.5  for vb6



Smart Indenter VBA on windows 64 bit

VBACodeIndenter_x64.zip‎ (29.5 KB, 284 views) Download


other version download


Mouse wheel events do not work in the Visual Basic 6.0 IDE


Download the latest version:

Binaries: VB6ScrollwheelFix7.zip

C++ Source: VB6ScrollWheelFixSource7.zip


Add mousewheel support for VB6 under Windows 8 and 10


VB6MouseWheelFix  download




Select all code

edit -> smart--


Install Rubberduck

Rubberduck is an open-source COM add-in project that integrates with the Visual Basic Editor to add modern-day features to the familiar IDE. Works in VBA6, VBA7.x (x86/x64), and yes, in VB6 too!

Rubberduck is an open-source COM add-in project for the VBA/VB6 IDE written in C#. It extends the VBEs capacities through various toolwindows and adds a UnitTesting suite.






VS6Installer v.6.2


Visual Basic 6.0 Runtime Plus

This is the complete package of runtime files and redistributable libraries for running or distributing applications written in Visual Basic 6.0 and together with some third-party redistributable components.




useful links

Visual Studio6.0安装详细步骤图文教程

Install Visual Studio 6.0 on Windows 10 step by step

How to install Visual Studio 6 on Windows 8.1 step by step


display line numbers in the VB6 / Visual Studio 6.0 IDE?