Link to home
Start Free TrialLog in
Avatar of stephenz43
stephenz43

asked on

Close 2 Forms on Exit

Hey guys

Ive got a formA that has a button that fires another form (reference Card) . I want to close both formA and formReference when formA is exited. Cant seem to get it right.

Thanks
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

If FormA if startup form, then you can write Me.Close() or End in FormA to close all forms.
Avatar of stephenz43
stephenz43

ASKER

formA is not a startup form nor a parent
>Ive got a formA that has a button that fires another form
that means that formA is the "parent" of the other one...
I guess a confusion of terms here.

As formA fires the other form, it should have/retain that form's reference. and using that, it can close it also at any time.
ASKER CERTIFIED SOLUTION
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Bit late but you can lop through the My.Application.OpenForms and close them fromt he main form.
"Loop"