Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   VB Idiot (http://www.programmingforums.org/showthread.php?t=12439)

boatn19 Jan 25th, 2007 12:47 PM

VB Idiot
 
I'm not asking for you to complete this help me out a bit...simple problem. I am trying to calculate sales x commission and show the commission rate with explicit on and well here it is and i am screwing up, can you tell me where to find the answer...

Option Explicit On
Option Strict On

Public Class MainForm

Private Sub xExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xExitButton.Click
Me.Close()
End Sub

Private Sub xCalcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xCalcButton.Click
' calculates and displays a commission

Const xCommissionLabel As Decimal = 0.1D
Dim xsalestextbox As Integer
Dim xCommissionLabel As String

Integer.TryParse(Me.xSalesTextBox, xCommissionLabel)
xCommissionLabel = xsalestextbox * 10.0
Me.xCommissionLabel.Text = Convert.ToString(xsalestextbox)

End Sub

Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub xCommissionLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xCommissionLabel.Click

End Sub

Private Sub xSalesTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xSalesTextBox.TextChanged

End Sub
End Class

hbe02 Jan 25th, 2007 5:18 PM

I would recommend reading a little tutorial first
http://www.functionx.com/vbnet/Lesson01.htm

also Nobody will look at ur code unless you post the code in Code tags so please do.

delete empty SUBS like these
:

Private Sub xCommissionLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xCommissionLabel.Click

End Sub


when you compile it will give you another error because u just deleted that line, so delete the line where that error occurs..

you can skip to lesson 3 of the tutorial linked above


All times are GMT -5. The time now is 8:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC