Textbox Question VS 2008

M

Mark Brown

I've used textboxes forever in VB but I'm having a problem now with VS 2008.
I put a text box on my form and when I tried to reference it in my program,
it says I can't refer to an instance member of a class from within a shared
method or shared member initializer without an explict instance of the
class. I just left the name as TextBox1. I tried to enter TextBox1.text =
data, but that doesn't work. Am I missing something obvious?
 
C

Cor Ligthert[MVP]

Mark,
Nevermind...I finally found the problem.
And that was, don't forget we are here to help each other, while beside the
MSFT nobody is paid for that, so if you ask, you have to contribute.

Cor
 
M

Mark Brown

Cor Ligthert said:
Mark,

And that was, don't forget we are here to help each other, while beside
the MSFT nobody is paid for that, so if you ask, you have to contribute.

The example code I was using had the procedure defined as "public
shared...". I didn't really notice that at first. I just took the "shared"
out and it all started working.

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top