我正在使用 Access 2013,但在使用 UBound() 时遇到问题。编译器无法识别该函数。也许这个函数来自一个特定的库,但微软网站上没有提到。 这是我使用的代码:
Dim Key(2) As String
Key(0) = "0"
Key(1) = "1"
Key(2) = "2"
UBound(Key,1)
有人有同样的问题吗?
谢谢!
最佳答案
这是一个函数,您需要将其返回值分配给某个东西。
Dim i As Integer
i = UBound(Key, 1)
您还可以使用它的返回作为变量
For i = 1 to UBound(Key, 1)
关于ms-access - 我无法在 VBA Access 中使用 UBound() 函数。好像没有被识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31837809/