VBA-tools / VBA-JSON

JSON conversion and parsing for VBA
MIT License
1.74k stars 566 forks source link

Add Option Private Module #251

Open DecimalTurn opened 1 year ago

DecimalTurn commented 1 year ago

This PR aims at fixing an issue mainly with Excel where the functions defined in JsonConverter.bas appear as Excel functions in the autocompletion suggestions and in the Insert Function Window. image image

Important note: The Option Private Module only prevents access from outide the VBA project. Hence, this won't affect normal use of VBA-JSON as explained in the documentation :

When a module contains Option Private Module, the public parts, for example, variables, objects, and user-defined types declared at the module level, are still available within the project containing the module, but they are not available to other applications or projects.

The only way this could affect negatively someone would be if they were calling JsonConverter's code from another VBProject. However, considering that JsonConverter is easily portable accross project, it's a much better practice to have a copy of it inside the project instead of having an external reference anyway.