954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Which component loaded my form

Hi all,

I'm working on a VB6 project and i'm a bit rusty as its been a while!!

I want to create one form that can be reused in several sections.

What I need is that my new form will know where it was called from. I can then grab some variables from the parent form, to populate my new form.

Does a form that's just been loaded know where the call to load came from?

Thanks

RedByte

Member 784374
Newbie Poster
5 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

It doesn't, unless you tell it! Meaning, create a public sub/function/routine that accepts what you want to pass as a parameter. As for reusing a form...

Dim F As Form1
Set F = New Form1
Load F
F.MyPublicSub "MyStringToPass"
F.Show


Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: