我遇到了公共阵列的问题。我使用其他语言的数组,以下代码似乎有意义:它应该工作。
当我尝试获取任一数组中的任何值时,它会返回空白。
public dim TicketSerial(0) as String
public dim TicketOpenedDate(0) as Date
function LoadFPRArray(ByVal LoadSerial as string, ByVal LoadTicketOpenedDate as Date) As Boolean
'Load array of ticket data into global variable (Create a hidden table to 'accomplish this, sort on date). Serial / Opened Date
Dim k as Long
k = UBound(TicketSerial)+1
Redim Preserve TicketSerial(0 to k)
Redim Preserve TicketOpenedDate(0 to k)
TicketSerial(k) = LoadSerial
TicketOpenedDate(k) = LoadTicketOpenedDate
return true
end function