Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » Absolutely New to VB.Net and Need a Little Help

Absolutely New to VB.Net and Need a Little Help

 
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-23-05, 02:23 PM
nothingofvalue nothingofvalue is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Absolutely New to VB.Net and Need a Little Help

Hey all,

I have just recently (couple of days) begun to learn VB.Net. I do not have any other programming experience other than some novice php coding, however, I have been "studying" through books and the internet. I am making pretty good progress with my understanding considering the time frame, but I think I am just totally missing something as it seems I keep running into the same problems over and over and I believe I am simply making a simple mistake but I cannot figure it out.

Basically I am trying to make a calculator that will calculate Ebay fees. I am getting lots of bugs that I am doing a fair job of working out, but I think I am very confused with why/when/how to convert variables as that seems to be my most encountered problem.

For instance, I want to read the value from a textbox, evaluate the value and then perform a simple mathematical computation based upon the evaluation, then print the computation in a label field. Here is the code I have tried (don't laugh too hard):

Private Sub EbayFees()

If Val(TextBox2.Text <= 25) Then
Label4.Text = Val(TextBox2.Text * 0.0525)
End If
End Sub

Obviously there would be more similar evaluations to follow if I can ever get the first one to work. When I try this, I get the following error:

An unhandled exception of type 'System.NullReferenceException' occurred in microsoft.visualbasic.dll

Additional information: Object reference not set to an instance of an object.

I know that this is probably very simple, however, it's not simple for me. If someone can point out what I am doing wrong I would appreciate it. Like I said, I think (actually I know) that I am not grasping the whole variable thing entirely.

Thanks in advance
__________________
http://www.nothingofvalue.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
 

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hey I lost VB.net program NEED HELP MikioZen Windows .NET Programming 8 08-25-05 12:00 PM
Need quality web hosting? digitalsabotage General Advertisements 2 05-21-04 03:21 PM
($50 for........)Need to get a small project in VB.NET done in 6 hours superprogrammer Job Offers & Assistance 3 01-29-04 01:13 AM
Need help setting up Linux DNS/Firewall mzawodny Job Offers & Assistance 1 01-06-04 04:05 AM
Need Database, Need to learn how to... tag98 Job Offers & Assistance 0 11-18-03 01:05 PM


All times are GMT -5. The time now is 05:56 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.