QB=0.042
QC=153.72
QD=1
If RadioButton2. Checked=True Or RadioButton3. Checked=True Then
QD=TextBox4. Text
QC QA * QB + 0.08=
QE=QD QC *
Label1. Text=Format (QE, "0. #)" 1
End the If
If RadioButton2. Checked=True Or RadioButton4. Checked=True Then
QD=TextBox4. Text
QC QA * QB=
QE=QD QC *
Label1. Text=Format (QE, "0. #)" 2
Execute code RadioButton2. Checked=True and RadioButton3 Checked=True so marked as 1 Label1. The Text shows the result is 153.7,
If the tag is 2 the line Lable1. Change the Text to other Lable according to execute code RadioButton2. Checked=True and RadioButton3 Checked=True so marked as 1 the line shows the result is 153.8,
Spread this is the reason why ask bosses, how to repair?
CodePudding user response:
Root cause is QA and QD start as plastic processingAdd clear to each variable type declaration
Dim QA as single, QB as single, QC as single, QD as single
CodePudding user response: