VB6 Add-Ins E.g. Class Builder

 
Normally located here:
      C:\Program Files\Microsoft Visual Studio\VB98\Wizards\
Then
      CLSSBLD.DLL
 
Run regsvr32.exe on these
 
API Viewer is in there somewhere
 
Advertisements

Object Oriented – OO – Visual Basic 6 Specifics – VB6

 
 
The word "Set" is often required. Omitting this in the following would compile but go through the Get routine instead and error in runtime.
 
Private Sub Class_Initialize()
    Set Me.Employee = New Employee
End Sub
 
 
In loops there are two options
Either Dim object as New instance inside loop. Then set to Nothing before next loop.
Do Until rsTD.EOF
Dim cTimeSheet As New clsTimeSheet
cTimeSheet.Employee.EmpeeNo = rsTD!EmpeeNo
Call cJS.colTimeSheets.AddTimeSheet(cTimeSheet, lngMaxEmp)

Set cTimeSheet = Nothing

rsTD.MoveNext
Loop

Or following with or without first New
Dim cTimeSheet As New clsTimeSheet

Do Until rsTD.EOF
Set cTimeSheet = New clsTimeSheet
cTimeSheet.Employee.EmpeeNo = rsTD!EmpeeNo
Call cJS.colTimeSheets.AddTimeSheet(cTimeSheet, lngMaxEmp)

rsTD.MoveNext
Loop