在一个很棒的VBA代码示例中 @
Function DistinctVals(arr, Optional col = 1)
Dim i&, v: v = arr
noreferrer“ > BYREF参数类型不匹配。
我的问题不是关于不匹配的 - 甚至词典都无法在Mac上使用,但这是关于以前从未见过的,并且在搜索引擎中找不到“ dim i& ”声明。在其他语言中,琥珀色代表参考,但是a)在这种情况下,这是没有意义的,b)没有记录 - 至少我找不到任何东西。
提前感谢
In a great VBA code example @https://medium.com/@daniel.ferry/excel-vba-get-unique-values-easily-592162f52c6e there is followng Variable declaration:
Function DistinctVals(arr, Optional col = 1)
Dim i&, v: v = arr
Everthing works fine in Windows but on Mac there is a ByRef argument type mismatch.
My question is not about the mismatch - there is even Dictionary not working on Mac, but it's about the never seen before and can't find with search engine "Dim i&" Declaration. In other languages the ambersand stands for Reference, but a) this does not make sense in this context and b) it's not documented - at least I can't find any.

Thanks in advance
发布评论
评论(1)
这意味着
长
类型。来自类型的速记为:%-Integer; & -长的; @ -货币; # -双倍的;呢-单身的; $ -String
This means
Long
type. From VBA reference:The shorthand for the types is: % -integer; & -long; @ -currency; # -double; ! -single; $ -string