Hi all,

I have a UserForm that already has some Initialize code in it. In this Init code, I want to use a Date that is pulled from a regular Module.

So in my regular Module, I have a variable, dInputDate. I want to pass this to the Userform so that the Init code can use it.

I tried putting this in my UF code:

Private dInputDateUF As Date

Property Let InputDate(dInputDateNew As Date)
    dInputDateUF = dInputDateNew
End Property
then, I used dInputDateUF in my Init code...
then, in my regular module, I have:


Dim MyUF1 As MyUF
Set MyUF1 = New MyUF
MyUF1.InputDate = dInputDate
MyUF1.Show
hoping that it would first call the Let property, but it doesn't...it calls the Init first. So, my data is not passed on via the Let before the Init.

What is the proper way to do this? I know I can do public vars and stuff, but I want to know the correct way.


Thanks,
Joe