Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2008 Passing textbox from form to module

$
0
0
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

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>