Public Function arrayfunction(i As Integer) As Integer()
Dim x(2) As Integer
x(0) = i + 10
x(1) = i + 20
arrayfunction = x '把x赋值给函数arrayfunction
End Function
Private Sub Command1_Click()
Dim y(2) As Integer
y = arrayfunction(1)
MsgBox y(0)
MsgBox y(1)
End Sub
编译错误,不能赋值给数组,为什么啊,求解,帮忙解答者,重赏40分
Dim x(2) As Integer
x(0) = i + 10
x(1) = i + 20
arrayfunction = x '把x赋值给函数arrayfunction
End Function
Private Sub Command1_Click()
Dim y(2) As Integer
y = arrayfunction(1)
MsgBox y(0)
MsgBox y(1)
End Sub
编译错误,不能赋值给数组,为什么啊,求解,帮忙解答者,重赏40分
解决方案 »
- 把TEXT1.TEXT中输入的任意文本转换成一个BYTE类型数组 怎么办?
- 操作word时遇到的问题,求教各位大侠
- 高分求教高手:关于treeview及滚动条及Tooltip的问题
- VB中提示FROM子句语法错误?
- 我用API做了一个动态生成菜单的工具,菜单信息放在.ini文件中 ,但菜单在MDI子窗体中不能显示?为什么?
- 有个问题急需解决!
- 紧急求救!在线等待:
- VB学到什么样的水平就可以找工作?
- 请问各位,我想让ComboBox只拥有选取功能,不要让用户自己输入数据,即只可选,不可输,我该怎么办呢?
- 怎么样给SQL6.5的存储过程中的参数赋值
- vba来实现6+1不重合排列组合
- 关于VB小问题
Dim X() As Integer
ReDim X(1)
X(0) = i + 10
X(1) = i + 20
arrayfunction = X '把x赋值给函数arrayfunction
End Function
Private Sub Command1_Click()
Dim Y() As Integer
ReDim Y(UBound(arrayfunction(1)))
Y = arrayfunction(1)
MsgBox Y(0)
MsgBox Y(1)
End Sub