![]() |
#2
风吹过b2016-06-14 08:18
|
text2输入小于1的数就出错
Private Sub Label1_Click() '''''''''谐振频率
If Val(Text2.Text) And Val(Text3.Text) <> 0 Then
Text7.Text = 1 / (6.28318530714 * Sqr(Val(Text3.Text) / 1000 * Val(Text2.Text) / 1000000))
Else: Text7.Text = "请输入正确的数值"
End If
If Val(Text4.Text) And Val(Text3.Text) <> 0 Then
Text7.Text = 1 / (0.0394784176 * Val(Text4.Text) * Val(Text4.Text) * Val(Text3.Text))
Else: Text7.Text = "请输入正确的数值"
End If
If Val(Text4.Text) And Val(Text2.Text) <> 0 Then
Text7.Text = 1 / (0.0394784176 * Val(Text4.Text) * Val(Text4.Text) * Val(Text2.Text))
Else: Text7.Text = "请输入正确的数值"
End If