Well as you are expert/arrogant enough to be able to tell me 'I must be doing something wrong!' Perhaps you can tell me what is wrong with this scenario;

Directly copy all code from post #1, paste into VB6 Pro SP6 on 64bit Win 10 Home. Change forms AutoRedraw to true then run programme.

There is a very brief flash and then the programme quits. Re-run the programme checking the value of hProv, it is ZERO therefore triggers the unload event!!!