D
Dan Wood
I have a few questions:-
1) I am running the following macro to look through my spreadsheet, and
every value 0 in the range it produces an email. However the problem i have
is if there is more then one value 0 the email produces multiple times. For
example if there are 2 cells with value 0, the email produces twice for each
cell, if there are 3 cells then the email produces 9 times. All i want is the
email to produces once for each system. The code is as below
Sub CheckDay()
Application.OnTime TimeValue("14:35:00"), "CheckDay"
For Each c In Range("D730")
If c.value = 0 Then
Call SendEmail
End If
Next
End Sub
2) My next question is how do i get my macro to run at a set time? The
second line of the code worked at first but not now. Any clues as to why it
has broken?
3) Last question, is there a way to run a macro without the sheet being open?
Thanks in advance
1) I am running the following macro to look through my spreadsheet, and
every value 0 in the range it produces an email. However the problem i have
is if there is more then one value 0 the email produces multiple times. For
example if there are 2 cells with value 0, the email produces twice for each
cell, if there are 3 cells then the email produces 9 times. All i want is the
email to produces once for each system. The code is as below
Sub CheckDay()
Application.OnTime TimeValue("14:35:00"), "CheckDay"
For Each c In Range("D730")
If c.value = 0 Then
Call SendEmail
End If
Next
End Sub
2) My next question is how do i get my macro to run at a set time? The
second line of the code worked at first but not now. Any clues as to why it
has broken?
3) Last question, is there a way to run a macro without the sheet being open?
Thanks in advance