View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Application.OnTIme

Thanks for the feedback Mike.

Gord

On Sat, 7 Aug 2004 14:40:31 -0700, "mike"
wrote:

Gord,

Thank you very much. I can now automate everything.

Mike

-----Original Message-----
You could place the code in the ThisWorkbook module as a

Workbook_Open Sub
which would run when the workbook is opened.

This would start the Timer, which would run copy3 at

13:00:00

If you are going to use Task Scheduler to open the

workbook at a certain
time(13:00:00) each day, you wouldn't need the

Application.OnTime code.

Just have the copy3 code in the Workbook_Open code. TS

would open the
workbook, copy3 would run, more code would save and

close the workbook if
desired.

Gord Dibben Excel MVP

On Sat, 7 Aug 2004 11:11:06 -0700,


wrote:

Stupid question:

How do you run the timer?


Ideally I would like this to run automatically. That

is
I would use Scheduled Tasks to bring the worksheet up
then later in the day have the copy macro run so I

don't
want to have to run the timer unless this can be done
automatically when the spreadsheet comes up.


thanks



-----Original Message-----
Did you run Timer?

In article ,
"Mike" wrote:

hi,

I created a copy macro within Excel that I need done
at a
certain time each day. The copy macro (called

copy3)
is
under the Modules portion in Visual basic.

I put the following in the Sheet2 page in Visual

basic:

Private Sub Timer()

Application.OnTime TimeValue("13:00:00"), "copy3"

End Sub


And it does not run the macro at 13:00.

What have I done wrong?
.


.