用VB 编写了一段控制代码 但运行是提示 无效外部过程
PublicPAsLongPublicUAsIntegerPublicWAsIntegerSetP=U/WIfP>30ThenSetW=W-0.01OrU=U+0.01I...
Public P As Long
Public U As Integer
Public W As Integer
Set P = U / W
If P > 30 Then
Set W = W - 0.01 Or U = U + 0.01
If P < 30 Then
Set W = W + 0.01 Or U = U - 0.01
End If
End If
Else
End 展开
Public U As Integer
Public W As Integer
Set P = U / W
If P > 30 Then
Set W = W - 0.01 Or U = U + 0.01
If P < 30 Then
Set W = W + 0.01 Or U = U - 0.01
End If
End If
Else
End 展开
6个回答
展开全部
写错了
记得 W不能为0
Public P As Long
Public U As Integer
Public W As Integer
Set P = U / W
If P > 30 Then
Set W = W - 0.01 Or U = U + 0.01
Else If P < 30 Then
Set W = W + 0.01 Or U = U - 0.01
End If
End
记得 W不能为0
Public P As Long
Public U As Integer
Public W As Integer
Set P = U / W
If P > 30 Then
Set W = W - 0.01 Or U = U + 0.01
Else If P < 30 Then
Set W = W + 0.01 Or U = U - 0.01
End If
End
追问
提示 要求对象 定义到 set P= U/W 的set
追答
汗 叫你给值了啊
我以为你的代码是简化的来的
U和W你自己处理了
Public P As Long
Public U As Integer
Public W As Integer
U = 10
W = 2
...........
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询