[Solved]
I am using the function: Application.OnTime TimeValue to run a specific macro every day at 4:00 PM, but at 4:00 PM the macro tries to launch another macro but is disabled by Excel even though the macro security is set to allow it to run. If I run the “Sample_Macro_Name” manually, it runs just fine. However, as soon as I use the another macro to launch the “Sample_Macro_Name” at a specific time, when the that time occurs, instead it returns the error message:
"Cannot run the macro Sample_Macro_Name() The macro may not be available in this workbook or all macros may be disabled”
Excel version: Office 2010
Macro security: set to enable all macros to be run.
Workbook is saved as a macro enabled workbook in a “trusted file location” on my local drive.
I have tried placing the 2nd bit of code, the macro, in standard modules, worksheet modules, and ThisWorkbook module, but in every case the macro will not fire with the Application.OnTime function, but will always fire when I manually launch it. It is as if Microsoft does not allow timed macros to fire off at a certain time due to security, yet it can be manually launched.
Folks, I appreciate your wise guidance.
Bookmarks