Sometimes, VBA code can be detected as a Visual Basic 6.0 (VB6).
The reason for it is that a some code modules in the project don't have any VBA specific syntax and Github-Linguist (the GitHub service that calculates the language statistics) looks only at the content and extension of a file to determine the language used for that file.
To solve this issue and make sure that files in this repo are correctly identified as VBA, there are a mainly 3 options:
(This is the best option in my opinion.) ie.:
Attribute VB_Name = "ComponentName"
'@Lang VBA
You can automate this process by using the VBA-Language-Annotation action.
*.bas linguist-language=vba
The advantage of this method is that you only have to make the change in one place. The disadvantage is that this won't solve the problem for GitHub searches because the linguist-language
attribute is not supported for searches 1. This means that if the VBA language filter is used in a search query, files that are currently labelled as VB6 still won't show up.
That second extension avoids any ambiguity between VBA and VB6, but you won't be able to use the simple Export feature of the VBE since you'll need to perform the renaming on every export.
Footnotes
-
This is due to the fact that Github Search relies on Go-Enry and Go-Enry doesn't support overrides at the moment. ↩