如题。。
Private Sub Form_Load()Dim d1 As SingleDim f As SingleDim p As SingleDim a As SingleDim d2 As DoubleDim l As SingleDim d3 As SingleDim pi As SingleDim k As SingleDim s As SingleDim sp As Single
End Sub
Private Sub Option1_Click()k = 1.1308s = 0.0075sp = 889End Sub
Private Sub Option2_Click()k = 1.133s = 8sp = 895End Sub
Private Sub Option3_Click()k = 1.1361s = 7.8sp = 885End Sub
Private Sub Command1_Click()
d1 = Val(Text1(0).Text)f = Val(Text2.Text)p = Val(Text3.Text)a = p / (sp * s * 1800)d2 = Sqr(4 * f / (3.14 * k * p))d3 = d2l = (a * ((d2 / 2) ^ 2)) / (d1 - d3) / 2 + d3Text4.Text = Format(a, "0.00000")Text5.Text = Format(d2, "0.00000")Text6.Text = Format(l, "0.00000")End Sub
问题出在a = p / (sp * s * 1800)这一句上
Private Sub Form_Load()Dim d1 As SingleDim f As SingleDim p As SingleDim a As SingleDim d2 As DoubleDim l As SingleDim d3 As SingleDim pi As SingleDim k As SingleDim s As SingleDim sp As Single
End Sub
Private Sub Option1_Click()k = 1.1308s = 0.0075sp = 889End Sub
Private Sub Option2_Click()k = 1.133s = 8sp = 895End Sub
Private Sub Option3_Click()k = 1.1361s = 7.8sp = 885End Sub
Private Sub Command1_Click()
d1 = Val(Text1(0).Text)f = Val(Text2.Text)p = Val(Text3.Text)a = p / (sp * s * 1800)d2 = Sqr(4 * f / (3.14 * k * p))d3 = d2l = (a * ((d2 / 2) ^ 2)) / (d1 - d3) / 2 + d3Text4.Text = Format(a, "0.00000")Text5.Text = Format(d2, "0.00000")Text6.Text = Format(l, "0.00000")End Sub
问题出在a = p / (sp * s * 1800)这一句上