From: Norm on
I have been able to create the macro to email my workbook (thanks Jakab) now
I want to schedule the emailing macros once a day and still be able to open
the workbook for updating throughtout the rest of the day . I tried the
windows scheduler but it will email each time I open the workbook. What can I
do to get what I want ...is it extra code in the macros or something I missed
in the scheduler?

Cheers
From: Gord Dibben on
You are probably running Workbook_open event code in order for the email to
be sent when Task Scheduler starts Excel and opens the workbook.

If you don't want the email sent every time you open the workbook you must
revise the code.

Maybe check for the time and if within a certain limit, cancel the email
event.

Else run your email code.

Example................

If Time > "3:00am" And Time < "4:00am" Then
send email code runs
Else
cancel = true 'cancels the send email code"
End If

Adjust time window to suit.


Gord Dibben MS Excel MVP


On Sat, 1 May 2010 09:40:08 -0700, Norm <Norm(a)discussions.microsoft.com>
wrote:

>I have been able to create the macro to email my workbook (thanks Jakab) now
>I want to schedule the emailing macros once a day and still be able to open
>the workbook for updating throughtout the rest of the day . I tried the
>windows scheduler but it will email each time I open the workbook. What can I
>do to get what I want ...is it extra code in the macros or something I missed
>in the scheduler?
>
>Cheers