1. The application file containing the macro must be open prior to that time and
2. you must have an OnTime method configured to run at the specified time. Run the OnTime method in the Open event of the application file containing the macro.
The former can be handled in Scheduled Tasks (in the Control Panel) and check VB help on the latter.
Skip, When a wee mystic is on the loose.. It's a Small Medium at Large!
What does this macro do? If you plan on having the macro loop nonstop for this entire period, that will probably eat up the resources of your machine quite a bit. If it is updating a workbook, that workbook will also probably run very slowly.
If you tell us your goal, we might be able to make suggestions that will work better.
Thanks guys. The macro in excel when running has a DDE conenction to PLC and reads and records a value every 5 seconds. I will have Excel running on a desktop 24/7.
could you not use an if statement that says if the current time is between 6 and 2 then to record value. An if statement could also be used for the days as well
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.