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

Needs object reference

$
0
0
Using Visual Basic 2010 Express, when I get to the Module (set a break-point beyond it), in the watch window, in regard to "form5.TestBox2.Text", I get: "Reference to a non-shared member requies an object reference." and of course, the filePath variable is empty.
I have only a vauge idea of what it is trying to tell me and of course, no idea of how to make an "object reference". Can someone please show me (not tell me please, I still will not know), how to do it.
I thought that the Form5 in "Form5.TextBox2.Text", would have told the program which object to deal with inasmuch as the, "Form5pwTextBox1.Text gets a correct variable.
Code:

'**************************************************************
Module Module1
    Public strFileNameVar As String = Form7.TextBox1.Text
    Public strPassWordVar As String = Form5.pwTextBox1.Text
    Public intPassWordLength As Integer
    Public filePath As String = Form5.TextBox2.Text
'************************************************************


Viewing all articles
Browse latest Browse all 27348

Trending Articles



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