Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call From another form...

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
How would I go about the following. I Close the form which has received the focus from another form...

I would like to Call a function from within the closing form through to the form which will take the focus and the code starts when the form is closing....

Any tips appreciated...

Thanks..
 
hmm

I would like to Call a function from within the closing form through to the form which will take the focus and the code starts when the form is closing....

That has got to be one of the most confusing things i've ever read.. How many times can we say form??? :)

if what i understand is correct, you have FORM1 and FORM2

FORM1 closes FORM2, and you want to call a function in FORM1 from FORM2 while it's closing??

If so, all you need to do is make a public function in Form1, and call it in Form2 's Unload function.


if you want to know how to close Form2 from Form1 then all you hvae to do is set up a function in Form2 called
Code:
Public Sub CloseMe()
    unload me
end sub

and in Form1 call
Code:
Form2.CloseMe()

..

ok now I think I'm going to have a stroke...

form1, form2, form ARRRGGGHHHHHH X-)

 
LOL..... I don't have enough brain cells to be able to work out what I'm doing let alone asking questions on top :eek:)

Reading it back I see your point....

Thanks... you/we got there in the end!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top