emailing worksheet

N

Norm

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top