How can I reference a control on a form from a module? For instance, I am trying to port some VB6 code to VB.NET and I have this in VB6:
where frmMain is the form and txtSB and txtRC are text boxes.Code:lA = Split(frmMain.txtSB.Text, vbCrLf) lB = Split(frmMain.txtRC.Text, vbCrLf)
When I put that code in VB.NET 2003, it says:
I have looked in MSDN and I have not been able to find anything that sufficiently explains how to do it (if it did, it was too complicated, I am not an expert). Could anyone help me with how to do this? Thanks.Reference to a non-shared member requires an object reference.




Reply With Quote