Public Function GetRandom()
Dim word() As String
Dim MyValue As String
word() = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
MyValue = word(Int((UBound(word) * Rnd)))
GetRandom = MyValue
End Function
vb的数组错哪了?
Dim word() As String
Dim MyValue As String
word() = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
MyValue = word(Int((UBound(word) * Rnd)))
GetRandom = MyValue
End Function
vb的数组错哪了?
Dim word() As Variant
Dim MyValue As String
word = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
MyValue = word(Int((UBound(word) * Rnd)))
GetRandom = MyValue
End Function