PDA

View Full Version : on each day, at 6am, the excel file will be opened by itself



clarksonneo
07-20-2011, 12:58 PM
Hi,

I think it may be impossible to create the macro below.
The reason to ask is that I want to learn.


Is it possible to create a macro which can perform the following tasks?

on each day, at 6am, the excel file will be opened by itself, and a new sheet will be inserted.

thanks

CatDaddy
07-20-2011, 01:05 PM
Application.OnTime TimeValue("06:00:00"), "my_Procedure", Schedule:=True)

'my_Procedure is the subroutine to run

CatDaddy
07-20-2011, 02:19 PM
this will not open the book by itself though...it should be done in conjunction with "Scheduled Tasks":

Windows - Start>Programs>Accessories>System Tools>Task Scheduler

Settings - Program to open (Excel), time (5 minutes before .OnTime), frequency (hourly, daily, monthly)