A antonomase Active Member Licensed User Longtime User Oct 14, 2013 #1 Hi, A question from a beginner. I want have a source code which begin to be very long and hard to read. I want to separate it into many specialized modules. But i don't know how to access to the objects into these modules example my main code is Code: Copy sub globals dim lblForname, lblSurname, lblFullname as Label dim btnSend as Button Sub btnSend_Click ComposeAddress End Sub Sub ComposeAddress lblFullname.Text = lblForname.Text & " " & lblSurname.Text End Sub I want to have main code Code: Copy sub globals dim lblForname, lblSurname, lblFullname as Label dim btnSend as Button Sub btnSend_Click AddressManager.ComposeAddress End Sub code Module AddressManager Code: Copy sub ComposeAddress lblFullname.Text = lblForname.Text & " " & lblSurname.Text End Sub It's just an example. The questio is : how to access to the objects of the screen from different modules. Thanks
Hi, A question from a beginner. I want have a source code which begin to be very long and hard to read. I want to separate it into many specialized modules. But i don't know how to access to the objects into these modules example my main code is Code: Copy sub globals dim lblForname, lblSurname, lblFullname as Label dim btnSend as Button Sub btnSend_Click ComposeAddress End Sub Sub ComposeAddress lblFullname.Text = lblForname.Text & " " & lblSurname.Text End Sub I want to have main code Code: Copy sub globals dim lblForname, lblSurname, lblFullname as Label dim btnSend as Button Sub btnSend_Click AddressManager.ComposeAddress End Sub code Module AddressManager Code: Copy sub ComposeAddress lblFullname.Text = lblForname.Text & " " & lblSurname.Text End Sub It's just an example. The questio is : how to access to the objects of the screen from different modules. Thanks
klaus Expert Licensed User Longtime User Oct 14, 2013 #2 See my answer in the French forum. Best regards. Upvote 0