Edit oct 22: !! Oh right, will fix the variable name and return from the function. Hmm..
Will update post with future problem once that's figured out.
~~~~
Ok, thanks. What I aim to do is take the variable of the input box and pass it down a procedure.
Somehow the value isn't being processed through to the calculation.
These are some pieces:
Quote:
Public Class Form1
Private Sub btnCalTax_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalTax.Click
Dim income As Double
GetData(income)
FedIncomeTax(income)
txtTaxable.Text = income
End Sub
|
Quote:
Sub GetData(ByVal income As Double)
income = CDbl(InputBox("Enter income"))
End Sub
|
Quote:
Function FedTax(ByRef income As Double) As Double
Select Case income
Case 7150 To 29050
Return 0.15 * (taxableIncome - 7150)
Case 29050 To 70350
Return 0.25 * (taxableIncome - 29050)
End Select
End Function
|