Frederick,
At this juncture I’d be starting the process of elimination but first a couple of questions:
Move/copy your working un-compiled workbook to your desktop
Move/copy your $Sign.ico file to your desktop
In your code point the location of your icon file to the desktop .ico file
Open the workbook from the desktop, modify code, save with SaveAs, then Save again
Compile the workbook with the default XLS Padlock compiler settings
Run the .exe file from the desktop
What results did you get?
Suggestions:
Stay away from read/writes to/from protected folders (i.e.,Program Files, Temp, Windows, etc.)
If you wish to distribute your app to others and absolutely need a folder where all user profiles can access,
use the “C:\Users\Public” folder.
In Excel open the VBA editor and go to Tools>Options>General and check the options for (make note of your setting before modifying):
Error Trapping: click on the "Break on Unhandled Errors"
Compile: Check both the “Compile on Demand” and “Background Compile”
When using API calls in Excel you have to be concerned that at any time a Microsoft Windows Update can halt/disable/abandon the execution of those API calls because of the lack of support for the older API programming language. API codes have only a limited life time. With API calls, you must always count on the fact that your code no longer works after an Windows update.
I’ve compiled the code in this discussion using Excel 2013, Excel 2016 and have tested it on Win 7 and Win 10 and it is working on both environments and Excel versions.
Let me know.
At this juncture I’d be starting the process of elimination but first a couple of questions:
- What version and build number of Windows are you running?
- What version and build number of Excel are you running?
- What version of XLS Padlock are you running?
- Is this an app that you are wanting to distribute to others?
Move/copy your working un-compiled workbook to your desktop
Move/copy your $Sign.ico file to your desktop
In your code point the location of your icon file to the desktop .ico file
Open the workbook from the desktop, modify code, save with SaveAs, then Save again
Compile the workbook with the default XLS Padlock compiler settings
Run the .exe file from the desktop
What results did you get?
Suggestions:
Stay away from read/writes to/from protected folders (i.e.,Program Files, Temp, Windows, etc.)
If you wish to distribute your app to others and absolutely need a folder where all user profiles can access,
use the “C:\Users\Public” folder.
In Excel open the VBA editor and go to Tools>Options>General and check the options for (make note of your setting before modifying):
Error Trapping: click on the "Break on Unhandled Errors"
Compile: Check both the “Compile on Demand” and “Background Compile”
When using API calls in Excel you have to be concerned that at any time a Microsoft Windows Update can halt/disable/abandon the execution of those API calls because of the lack of support for the older API programming language. API codes have only a limited life time. With API calls, you must always count on the fact that your code no longer works after an Windows update.
I’ve compiled the code in this discussion using Excel 2013, Excel 2016 and have tested it on Win 7 and Win 10 and it is working on both environments and Excel versions.
Let me know.