There is no need for an *.obj modue... instead it is sufficient:

To place this line here anywhere in any of the Projects *.bas modules:
Code:
Sub NvOptimusEnablement(): End Sub
And then put this block at the end of a *.vbp File (with a normal Text-Editor):
Code:
[VBCompiler]
LinkSwitches=/EXPORT:NvOptimusEnablement
There also seems to be some confusion, on what it does exactly.

It will only enforce a preference (of the NVidia-driver, though restricted to code-sections which make use of the GPU)...
And it does that only, when you have an additional GPU in your system...
(as e.g. in Notebooks who have an integrated Intel- or AMD- default-GPU + sometimes an extra-NVidia-chip).

Without this export, there's also an easy way to startup an Executable with GPU-preference.
E.g. on my Win10 - via RightClick-ContextMenu:
> Run with graphicsProcessor > Integrated graphics (default)
> Run with graphicsProcessor > High Performance NVIDIA processor
This will achieve the same effect without any export-defs (when you choose NVIDA).

With the export-def in place (as shown above), the Context-Menu-choice is just "overridden"...
(the executable will then always startup with the NVidia-preference (if the system has an NVIdia-GPU installed).

HTH

Olaf