Home > Software engineering >  Seek help from bosses, why Label1. Text returns the result of 0.08 no execution
Seek help from bosses, why Label1. Text returns the result of 0.08 no execution

Time:01-21

QA=3660

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 processing

Add clear to each variable type declaration
Dim QA as single, QB as single, QC as single, QD as single

CodePudding user response:

reference 1/f, crispy big ice cream reply:
root cause is QA and QD began as plastic processing

Add clear to each variable type declaration
Dim QA as single, QB as single, QC as single, QD as single


Or you badly, I didn't see want to express what he meant

CodePudding user response:

reference 1/f, crispy big ice cream reply:
root cause is QA and QD began as plastic processing

Add clear to each variable type declaration
Dim QA as single, QB as single, QC as single, QD as single
thank you master, I realized
  • Related