J
jfp
When i create a new instance of a class module, the associated
Initialize event does not seem to fire.
More speicifcally, i never reach a breakpoint set in
EEE_PrintReport_Class_Initialize()
(note: EEE_REPORTPARAMS is a UDT defined elsewhere)
-=-=-=
In the main form:
Private PR As EEE_PrintReport_Class
Private RepParams As EEE_REPORTPARAMS
Set PR = New EEE_PrintReport_Class
' Supposedly, the Initialize event should fire HERE ...
RepParams = PR.ReportParams() ' This sets default values
-=-=-=
The class module:
Private RP As EEE_REPORTPARAMS
Public Property Let ReportParams(x As EEE_REPORTPARAMS)
RP = x
End Property
Public Property Get ReportParams() As EEE_REPORTPARAMS
ReportParams = RP
End Property
Private Sub EEE_PrintReport_Class_Initialize()
'**
'* Possible initializations here of various UDT members to
'* "sensible" defaults.
'* Since memory is initially zeroed, the initial states are:
'* numeric types: Zero
'* Booleans: False
'* strings: empty ("")
'* dates
'**
RP.iCopies = 1 ' # of copies to print
RP.bEditPath = True ' user is allowed to change file path
RP.bEditName = True ' user is allowed to change file name
End Sub
-=-=-=
Any ideas ?
Initialize event does not seem to fire.
More speicifcally, i never reach a breakpoint set in
EEE_PrintReport_Class_Initialize()
(note: EEE_REPORTPARAMS is a UDT defined elsewhere)
-=-=-=
In the main form:
Private PR As EEE_PrintReport_Class
Private RepParams As EEE_REPORTPARAMS
Set PR = New EEE_PrintReport_Class
' Supposedly, the Initialize event should fire HERE ...
RepParams = PR.ReportParams() ' This sets default values
-=-=-=
The class module:
Private RP As EEE_REPORTPARAMS
Public Property Let ReportParams(x As EEE_REPORTPARAMS)
RP = x
End Property
Public Property Get ReportParams() As EEE_REPORTPARAMS
ReportParams = RP
End Property
Private Sub EEE_PrintReport_Class_Initialize()
'**
'* Possible initializations here of various UDT members to
'* "sensible" defaults.
'* Since memory is initially zeroed, the initial states are:
'* numeric types: Zero
'* Booleans: False
'* strings: empty ("")
'* dates
'**
RP.iCopies = 1 ' # of copies to print
RP.bEditPath = True ' user is allowed to change file path
RP.bEditName = True ' user is allowed to change file name
End Sub
-=-=-=
Any ideas ?