Private Sub Command4_Click()
If be <= 2.4 Then
Fwe = 0.87
ElseIf be <= 2.7 And be > 2.4 Then
Fwe = 0.9
ElseIf be <= 3 And be > 2.7 Then
Fwe = 0.93
ElseIf be <= 3.4 And be > 3 Then
Fwe = 0.97
ElseIf be <= 3.7 And be > 3.4 Then
Fwe = 1
ElseIf be <= 4 And be > 3.7 Then
Fwe = 1.03
ElseIf be <= 4.3 And be > 4 Then
Fwe = 1.07
ElseIf be > 4.3 Then
Fwe = 1.1
End If
If bw <= 2.4 Then
Fww = 0.87
ElseIf bw <= 2.7 And bw > 2.4 Then
Fww = 0.9
ElseIf bw <= 3 And bw > 2.7 Then
Fww = 0.93
ElseIf bw <= 3.4 And bw > 3 Then
Fww = 0.97
ElseIf bw <= 3.7 And bw > 3.4 Then
Fww = 1
ElseIf bw <= 4 And bw > 3.7 Then
Fww = 1.03
ElseIf bw <= 4.3 And bw > 4 Then
Fww = 1.07
ElseIf bw > 4.3 Then
Fww = 1.1
End If
If bs <= 2.4 Then
Fws = 0.87
ElseIf bs <= 2.7 And bs > 2.4 Then
Fws = 0.9
ElseIf bs <= 3 And bs > 2.7 Then
Fws = 0.93
ElseIf bs <= 3.4 And bs > 3 Then
Fwe = 0.97
ElseIf bs <= 3.7 And bs > 3.4 Then
Fws = 1
ElseIf bs <= 4 And bs > 3.7 Then
Fws = 1.03
ElseIf bs <= 4.3 And bs > 4 Then
Fws = 1.07
ElseIf bs > 4.3 Then
Fws = 1.1
End If
If bn <= 2.4 Then
Fwn = 0.87
ElseIf bn <= 2.7 And bn > 2.4 Then
Fwn = 0.9
ElseIf bn <= 3 And bn > 2.7 Then
Fwn = 0.93
ElseIf bn <= 3.4 And bn > 3 Then
Fwn = 0.97
ElseIf bn <= 3.7 And bn > 3.4 Then
Fwn = 1
ElseIf bn <= 4 And bn > 3.7 Then
Fwn = 1.03
ElseIf bn <= 4.3 And bn > 4 Then
Fwn = 1.07
ElseIf bn > 4.3 Then
Fwn = 1.1
End If
Select Case Tabs
Case 1
If q1 <> 0 Then q1,q2,q3,q4是全局变量,在上一窗体中赋值
s1 = 1800 * Val(Text1.Text) * Fwe
Text5.Text = Val(s1)
ElseIf q1 = 0 Then
s1 = 0
End If
Case 2
If q2 <> 0 Then
s2 = 1800 * Val(Text2.Text) * Fwe
Text6.Text = Val(s2)
ElseIf q2 = 0 Then
s2 = 0
End If
Case 3
If q3 <> 0 Then
s3 = 1800 * Val(Text3.Text) * Fwe
Text7.Text = Val(s3)
ElseIf q3 = 0 Then
s3 = 0
End If
Case 4
If q4 <> 0 Then
s4 = 1800 * Val(Text4.Text) * Fwe
Text8.Text = Val(s4)
ElseIf q4 = 0 Then
s4 = 0
End If
End Select
End Sub
Private Sub Text1_Change()
be = Val(Text1.Text)
End Sub
Private Sub Text2_Change()
bw = Val(Text2.Text)
End Sub
Private Sub Text3_Change()
bs = Val(Text3.Text)
End Sub
Private Sub Text4_Change()
bn = Val(Text4.Text)
End Sub