Private Function GetRndDKey() As dk()
Dim ret() As dk
ReDim ret(5)
For i = 1 To 5
Randomize
ret(i) = dkey(Fix(Rnd * UBound(dkey) + 1))
Next
GetRndDKey = ret
End Function
我下面的写法哪里错了?
Private Function GetRndDKey() As dk() '随机取出3行D
Dim ret() As dk
ReDim ret(6)
For i = 1 To 5
Randomize
ret(i) = dkey(Fix(Rnd * UBound(dkey) + 1))
Next
ret(6) = newone
GetRndDKey = ret
End Function
Private Type dk
dkey As String
skey As String
End Type
VB 怎么给数组添加项
答案:3 悬赏:60 手机版
解决时间 2021-03-15 00:15
- 提问者网友:黑米和小志
- 2021-03-14 05:58
最佳答案
- 五星知识达人网友:掌灯师
- 2021-03-14 07:01
Private Function GetRndDKey() As dk() '随机取出3行D
Dim ret() As dk 定义ret数组
ReDim ret(6)
For i = 1 To 5
Randomize
ret(i) = dkey(Fix(Rnd * UBound(dkey) + 1)) 数组dkey从哪儿来?
Next
ret(6) = newone newone是什么
GetRndDKey = ret
End Function
Dim ret() As dk 定义ret数组
ReDim ret(6)
For i = 1 To 5
Randomize
ret(i) = dkey(Fix(Rnd * UBound(dkey) + 1)) 数组dkey从哪儿来?
Next
ret(6) = newone newone是什么
GetRndDKey = ret
End Function
全部回答
- 1楼网友:廢物販賣機
- 2021-03-14 08:14
这里面的dk什么意思?
- 2楼网友:春色三分
- 2021-03-14 07:54
开始创建一个控件,index属性设为0,以后添加的话可以这样。以textbox为例:
load text1(1)
with text1(1)
.top=100
.left=100
...
.visible=true
end with
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯