ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   emailing worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/262925-emailing-worksheet.html)

Norm

emailing worksheet
 
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

Gord Dibben

emailing worksheet
 
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
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




All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com