OK here is what I have for the code now and it still will not load my
form when I run it.
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnCalculate.Click
Dim c As Double = CDbl(txtOrderCost.Text)
Dim r As Integer = CInt(txtMonthlyDemand.Text)
Dim p As Double = CDbl(txtPartCost.Text)
Dim f As Decimal = CDec(0.15)
Dim h As Double = p * f
Dim eoq As Decimal = CDec((p / r) * 0.15 * 332100)
'for the eoq, use the below formula as a guide
'replace with correct formula
'eoq = CDec((p / r) * 0.15 * 332100)
lblEOQ.Text = "EOQ = " & eoq
End Sub
FOR THE INPUTS I AM USING :
order cost 25.00
Monthly demand 90000
Part cost 18.75
Thats what I want to use but the form never opens for me to enter them
in, I dont even get that far.
On Feb 12, 8:04 pm, "Newbie Coder" <newbieco...@spammeplease.com>
wrote:
A double is expection whole numbers & not 0.15
try using 'Decimal' as the result instead of 'Double'
Example:
Dim eoq As Decimal = (p / r) * 0.15 * 332100
lblEOQ.Text = "EOQ = " & eoq
I haven't tried your code because you never gave any possible values for
OrderCost, MonthlyDemand or PartCost
--
Newbie Coder
(It's just a name)