Form_Load()


Posted by Geoff on June 26, 2000 5:02 AM

Using VBA in Excel 97, I haven't had much luck getting Form_Load() to run when a form is loaded. Here is an exact copy of my code (copy/pasted):

Private Sub Form_Load()
Flow = False
BackPress = False
Cancelled = False
Label3.Caption = "Known: , Calculate:"
End Sub

And it is not getting invoked when the form is loaded. I use the lines (copy/pasted):

Load frm3PASS_LIB
frm3PASS_LIB.Show

to load the form. Perhaps Form_Load() doesn't apply to VBA, only VB? If someone knows, please let me know. Thanks in advance.

Posted by Ryan on June 26, 2000 7:20 AM

Try using the UserForm_Initialize() procedure instead. I think you are right in thinking that there is no Form_Load event. Hope this helps, let me know.

Ryan

Posted by Geoff on June 26, 2000 7:25 AM

Ryan,

Yes, it works perfectly. Thanks a lot! You're always a great help!

Posted by RYan on June 26, 2000 8:42 AM

Repost,
Somehow you posted your message at the exact same time as Geoff did, and it's funny how you both were addressing me, but your message was not posted. Try again please.

Ryan

Posted by Geoff on June 26, 2000 8:51 AM

Ryan,

I wrote:

"Yes, it works perfectly. Thanks a lot! You're always a great help!"

I think I'm a little confused....hehe

Geoff

Posted by Keith on June 27, 2000 1:38 AM

E-mail

Weird, this is Keith signing on.

Ryan, I was wondering if I could e-mail you the programme as is probably easier explained.

Keith.



Posted by Ryan on June 29, 2000 7:09 PM

Re: E-mail

Go ahead and email me