obriensj
07-19-2012, 01:23 AM
Hi,
Not sure if this is possible but I have seen code for application.ontime in relation to automatically running a macro at a certain time.
I can get this to run ok on my PC but the user has to actually run the macro and then say 10, 20 secs later the macro will execute.
What I want is the ability for a macro to run automatically based on criteria I have in another spreadsheet. See sample.xlsx.
So for instance every weekday I have two cut off times, 2pm and 4pm, if there is nothing populated in the cut off1 column then my macro will run.
The same for cut off 2, if it does not say "yes" then my macro will run.
How can I code a macro to say when it gets to 2pm and 4pm respectively for that business day to look at this spreadsheet (sample.xlsx), look at columns A (which has the business day) B and C and if one or both of those columns is blank, eg does not say "Yes" then execute my macro? When it says "Yes" then do not execute my macro?
The macro needs to execute at 2pm and 4pm so twice daily. When I refer to my macro I already have another macro which then sends an email out.
Is this possible at all?
Thanks
Not sure if this is possible but I have seen code for application.ontime in relation to automatically running a macro at a certain time.
I can get this to run ok on my PC but the user has to actually run the macro and then say 10, 20 secs later the macro will execute.
What I want is the ability for a macro to run automatically based on criteria I have in another spreadsheet. See sample.xlsx.
So for instance every weekday I have two cut off times, 2pm and 4pm, if there is nothing populated in the cut off1 column then my macro will run.
The same for cut off 2, if it does not say "yes" then my macro will run.
How can I code a macro to say when it gets to 2pm and 4pm respectively for that business day to look at this spreadsheet (sample.xlsx), look at columns A (which has the business day) B and C and if one or both of those columns is blank, eg does not say "Yes" then execute my macro? When it says "Yes" then do not execute my macro?
The macro needs to execute at 2pm and 4pm so twice daily. When I refer to my macro I already have another macro which then sends an email out.
Is this possible at all?
Thanks