schedule to start and stop rumming of a macro

Vilas Desai

New Member
Joined
Jan 28, 2011
Messages
4
I have a macro that picks up 'samenamed.csv' file from 40 IP addresses and saves these in 40 sheets of a file (loggedfiles.xlsm) at a remote location. The macro is a worksheet macro in the loggedfiles.xlsm, what I would like to do is to run this macro repeatedly after every 1 hour and stop running the macro after the last file is logged. for ex, if I run the macro at 1pm and the last logged file (corresponding to the 40th IP address) is at 1.35pm, then the macro has to stop running at 1.35 pm. and again start at 2.00pm.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
VBA can not do this properly. There is no way to do a timed event other than have a macro run continuous and carry out the tasks as timed. But that means that while waiting for the next event the processor is occupied waiting, ie you cannot access Excel during this time (and if it is done on your PC, your PC will be very slow as it continues to run VBA).
 
Upvote 0

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top