VBA ( Visual Basic for Applications ) is not VB.NET, although they have the same "Visual Basic" and similar syntax. (Related documentation for VB.NET, not VBA.)
VB6 and VBA in Microsoft Office (., For example, Access, Excel) treats Any as a reserved word , and it cannot be used as an identifier:
You may also encounter errors if you use a reserved word to indicate a control, object, or variable. Received error messages do not necessarily tell you that the reason is a problem with a reserved word.
In VB.NET, however, there is no problem using Any as a variable name or another identifier:
Dim Any as String = "Hello world!" 'works just fine in VB.NET
source share