»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 11-12-2003, 09:49 PM   #1 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
I'm a n00b, and I need help(Visual basic)

Hello. I'm new in using Visual Basic. I started 5 days ago. I have a question. I'm having a problem with a variable equaling a text box. The code I use is
Code:
Dim intYears As Integer 
intYears = txtYears.Text
It allways shows a message saying
Quote:
Method or data member not found.
Can someone tell me what I'm doing wrong and tell me what i should do?
Thank you.

Andybebad is offline   Reply With Quote
Old 11-12-2003, 10:19 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
are you sure that is the name of the textbox you created?

When you click on the textbox you want the value of, and you check in the properties page. For the "Name" item, is it "txtYears" ?

The "Caption" property is not the important one here btw

Welcome to TechIMO
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 11-13-2003, 06:02 AM   #3 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
Yes i'm sure I had the name set as txtYears.
Andybebad is offline   Reply With Quote
Old 11-13-2003, 11:37 AM   #4 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
is this vb6 or vb.net?

is there any other code in there?
Is this the line that it actually stops on?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 11-13-2003, 04:04 PM   #5 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
VB4
Andybebad is offline   Reply With Quote
Old 11-13-2003, 04:05 PM   #6 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
I think i got it now. Thanks for your help
Andybebad is offline   Reply With Quote
Old 11-14-2003, 02:26 PM   #7 (permalink)
Registered User
 
Join Date: Oct 2003
Location: Ohio
Posts: 41
DrDave1958 is on a distinguished road
I think your trying to set a variable dimensioned as an integer with text. Try this.

Dim intYears As Integer
intYears = val(txtYears.Text)

-Dave-
DrDave1958 is offline   Reply With Quote
Old 11-14-2003, 04:24 PM   #8 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
Yah...Thats the ticket! Thanks!
Andybebad is offline   Reply With Quote
Old 11-14-2003, 05:10 PM   #9 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
Well I try to run the application and it highlights .Text and says Method or Data member not found?
Andybebad is offline   Reply With Quote
Old 11-14-2003, 05:11 PM   #10 (permalink)
Registered User
 
Join Date: Nov 2003
Posts: 34
Andybebad is on a distinguished road
Never mind... Figured that one out by myself
Andybebad is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 04:23 PM.