I have code perfect but doen't give total So what's wrong?
-
2012年3月9日 下午 11:57
If radMen.Checked = True Then
lblYears.Text = InputBox("What is your age?", "", "Years")
lblWeight.Text = InputBox("What is your weight?", " ")
lblInches1.Text = InputBox("What is your height?", "Inches")
lblYears.Text = InputBox("What is your age?", "Years")
lblKilograms2.Text = InputBox("what is your weight in Kilograms")
lblMeters.Text = InputBox("what is your height?", " Meters/ centimers?")
'Display the total.
BMRTotal = CDbl(66) + CDbl(6.23) * CDbl(lblWeight.Text) + CDbl(12.7) * CDbl(lblInches1.Text) - CDbl(6.8) * CDbl(lblYears1.Text)
'Displays the men's
BMRTotal = CDbl(66) + CDbl(13.7) * CDbl(lblKilograms2.Text) + CDbl(9.5) * CDbl(lblMeters.Text) - CDbl(6.8) * CDbl(lblYears.Text)
End If
End Sub- 已移動 Esther FanMicrosoft Employee, Moderator 2012年4月23日 上午 12:57 (From:Visual Studio Class Designer)
所有回覆
-
2012年3月12日 上午 05:02版主
Hi Del4me,
Welcome to the MSDN forum.
I’d like to clarify what type BMRTotal is in your code. I’ve tried your code, and it works fine when I use BMRTotal as label control. In addition, I’d like to suggest you add breakpoint at code that setting value of BMRTotal to watch the process for detailed information.
I’d appreciate your feedback and have a nice day.
Shanks Zen
MSDN Community Support | Feedback to us

