Hey guys i have to write a program for class here is the criteria:
You are to create an application that will figure the amount of commission that a stock broker will receive based on the amount of the sale. The user should be able to enter a stock transaction and determine the stock holders commission. Each transaction includes the following data:
For now i just wanted it see if the total stock is correct so i put the commission in a total text box:
when i try running it, it gives me this error saying something about dependencies...
I dont know what's wrong
Can you help me fix it? i am a beginner
Heres my code so far:
Option Strict On
Public Class Form1
Dim dblPrice, dblNumber, dblCommissionRate, dblCommission As Double
Dim strStockName, strStockbroker As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
txtPrice.Text = CStr(dblPrice)
txtNumber.Text = CStr(dblNumber)
If dblPrice <= 50.0 Then
dblCommissionRate = 0.19
Else
If dblPrice > 50.0 Then
dblCommissionRate = 0.26
End If
End If
If dblNumber <= 150.0 Then
dblCommission = 1.5 * dblCommissionRate
Else
If dblNumber > 150 Then
dblCommission = 1.0 * dblCommissionRate
End If
End If
txttotal.Text = CStr(dblCommission * dblNumber)
End Sub
End Class
You are to create an application that will figure the amount of commission that a stock broker will receive based on the amount of the sale. The user should be able to enter a stock transaction and determine the stock holders commission. Each transaction includes the following data:
- Stock name
- Price per share
- Number of shares involved
- Stock holders name
For now i just wanted it see if the total stock is correct so i put the commission in a total text box:
when i try running it, it gives me this error saying something about dependencies...
I dont know what's wrong
Can you help me fix it? i am a beginner
Heres my code so far:
Option Strict On
Public Class Form1
Dim dblPrice, dblNumber, dblCommissionRate, dblCommission As Double
Dim strStockName, strStockbroker As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
txtPrice.Text = CStr(dblPrice)
txtNumber.Text = CStr(dblNumber)
If dblPrice <= 50.0 Then
dblCommissionRate = 0.19
Else
If dblPrice > 50.0 Then
dblCommissionRate = 0.26
End If
End If
If dblNumber <= 150.0 Then
dblCommission = 1.5 * dblCommissionRate
Else
If dblNumber > 150 Then
dblCommission = 1.0 * dblCommissionRate
End If
End If
txttotal.Text = CStr(dblCommission * dblNumber)
End Sub
End Class