I have an application migrated from vb6 to vb.net.
I want to access the text of Textbox1 in SearchFieldsof module.
I do not want to pass it as a parameter because I have so many controls to pass.
Please provide some example.
My code is frmNew page have Textbox1
Private Sub Ok_Click(.....)
call SearchFields()
Me.Close()
End Sub
Inside module I have method below
Sub SearchFields()
Dim str As string
Dim frm As New frmNew
str = frm.Textbox1.Text
End Sub
frmNew.Textbox1.Text is getting nothing
I want to access the text of Textbox1 in SearchFieldsof module.
I do not want to pass it as a parameter because I have so many controls to pass.
Please provide some example.
My code is frmNew page have Textbox1
Private Sub Ok_Click(.....)
call SearchFields()
Me.Close()
End Sub
Inside module I have method below
Sub SearchFields()
Dim str As string
Dim frm As New frmNew
str = frm.Textbox1.Text
End Sub
frmNew.Textbox1.Text is getting nothing