SimDuck Posted May 10, 2006 Posted May 10, 2006 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 Quote
Administrators PlausiblyDamp Posted May 10, 2006 Administrators Posted May 10, 2006 http://www.xtremedotnettalk.com/showthread.php?t=83092 might be worth a read first, if you are still having problems then let us know. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
SimDuck Posted May 10, 2006 Author Posted May 10, 2006 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.