0

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.

Dim declaration with ambersand

Thanks in advance

2
  • 1
    It means Dim i As Long. Commented Jul 2, 2022 at 19:21
  • For a MAC dictionary alternative, you might try using this Commented Jul 2, 2022 at 21:35

1 Answer 1

1

This means Long type. From VBA reference:

The shorthand for the types is: % -integer; & -long; @ -currency; # -double; ! -single; $ -string

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much for quick response! [ I had already been at this site but had overseen this part ]
@user3665647, yeah. Some information from documentation is not so easy to find :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.