cancel
Showing results for 
Search instead for 
Did you mean: 

Reference to a non-shared member requires an object reference.

Former Member
0 Kudos

Hi All,

when i am building my application i am getting error message as follows.

"Reference to a non-shared member requires an object reference.".

pls help me to fix this.

i have restarted my system still it is saying same error message.

Thanks in Advance,

With Regards,

Raju.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

this helped me to solve the problem

Former Member
0 Kudos

Grtt.You can update me with some points

Former Member
0 Kudos

Thanks Abhishek,

It is working.

With Regards,

Raju.

Former Member
0 Kudos

Glad could help you

Former Member
0 Kudos

A non-Shared member, or instance member, is one that is called on an instance of the class. If you re trying to call a method(say MethodA) of a class(ClassA) on another class(ClassB) directly then it is not permitted. You have to create an instance of the class(ClassA) and then call its method(MethodA) in the class(CLASSB).

Former Member
0 Kudos

As an example consider that You have 2 forms Form1and Form2. There is a TextBox in Form1 namely Text1 which needs to be accessed in Form2.

This should be done like this(in Form2)

Dim temp as New Form1( )

temp.Text1.Text = "Sample"