vb定义后的数组显示缺少数组时什么原因?
部分程序如下,在Y(i)处提示缺少数组模块中:Publicx()AsDoublePublicy()AsDoublePublica,bAsDoublePublicxp,yp...
部分程序如下,在Y(i)处提示缺少数组
模块中:
Public x() As Double
Public y() As Double
Public a, b As Double
Public xp, yp As Double
Public N As Byte
窗体中:
Private Sub cmd_enter_Click()
Dim i, h, j As Byte
Dim d, c, e, f, x, y As Double
ReDim y(i)
ReDim x(i)
For i = 0 To 9
If Txt_x(i).Text <> " " And Txt_y(i).Text <> " " Then
x(i) = Val(Txt_x(i - 1).Text)
y(i) = Val(Txt_y(i - 1).Text)
h = h + 1
End If
Next i
If h < N Then
MsgBox "你只输入" + Str$(N) + "组数字!", vbExclamation
End If 展开
模块中:
Public x() As Double
Public y() As Double
Public a, b As Double
Public xp, yp As Double
Public N As Byte
窗体中:
Private Sub cmd_enter_Click()
Dim i, h, j As Byte
Dim d, c, e, f, x, y As Double
ReDim y(i)
ReDim x(i)
For i = 0 To 9
If Txt_x(i).Text <> " " And Txt_y(i).Text <> " " Then
x(i) = Val(Txt_x(i - 1).Text)
y(i) = Val(Txt_y(i - 1).Text)
h = h + 1
End If
Next i
If h < N Then
MsgBox "你只输入" + Str$(N) + "组数字!", vbExclamation
End If 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询