Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I�m having a problem accessing a sub routine between forms

 

I have three forms

FormA

FormB

FormC

 

FormA calls FormB modally (with backwards data links) and FormB calls FormC modally (with backwards data links)

 

My problem is that I have a sub routine in FormC that needs to access a public sub routine in FormA and then have some data returned.

 

I have tried:

(FormC�s sub routine)

Dim frmFormA as FormA (FormA has no sub new declarations)

frmFormA.subroutine(declarations)

 

When I call FormA�s subroutine, FormC exits and shows FormB modally.

 

I don�t want to declare a new FormA in FormC as I need to have access to the data stored in FormA.

 

How do I declare FormA i(with current data) n FormC, access a sub routine in FormA and then return the data to FormC�s sub routine?

 

Thank you

Posted

Thank you PlausiblyDamp.

 

The link was a big help. What I didn't do was set up FormC to receive both Form A&B in the sub new. I only had FormB in there.

 

I realised I needed to pass reference to both FormA & FormB to FormC's sub new from FormB.

 

Thank you again

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...