problem with Initialize for class module

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 ?
 
T

TC

Are you sure you've created the class module as a class module - not a
standard module?

HTH,
TC
 
J

jfp

Yes.
In the browser window (or, whatever you call it), it is under "Class
Modules"
-=-=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top