vb中的取反
已经算出Text2的值,现在想通过点击command4,得出Text4=(Text2取反值):PrivateSubCommand4_Click()DimsAsLongDi...
已经算出Text2的值,现在想通过点击command4,得出Text4=(Text2取反值):
Private Sub Command4_Click()
Dim s As Long
Dim i As Long
For i = 0 To 31
If (Val(Text2) And 2 ^ i) = 0 Then s = s + 2 ^ i
Next i
Text4.Text = s
End Sub
但是现在一直提示我“实时错误6 溢出”,怎么整? 展开
Private Sub Command4_Click()
Dim s As Long
Dim i As Long
For i = 0 To 31
If (Val(Text2) And 2 ^ i) = 0 Then s = s + 2 ^ i
Next i
Text4.Text = s
End Sub
但是现在一直提示我“实时错误6 溢出”,怎么整? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询