I have built a small script to demonstrate this. If this script is run by doubleclicking on desktop it will do its job. Press click me it will print a number next to it. Press clear me to clear the value. Very simple
If you try to run this script by calling excel.exe in a cmd box as a file input to it - excel.exe testexample.xlsm. Both buttons immediately lose their clickability.
It will be the same if you do RUN under START button in windows. The behaviour is the same as long as you call it using the script as an input.
Pay attention to workbook_open I use an infinite loop with DoEvents in there to retain interaction with systems.
Why are the activeX buttons losing their functionality?
If we open visual basic editor and stop the loop, then reset and finally restart it. It will run normal again! The activeX will spring back alive.
Bookmarks