Call Macro If x 2 Q
On Feb 18, 5:07*pm, Sean wrote:
I can't get the following extract of code to work, it doesn't execute
as I expect
My cells values a-
AE6 = 0
BF1 = 18/02/08 i.e. Monday
Thus I expect Mail_New_Version to be 'skipped' and MailToBobWeekly to
execute. What am I doing incorrectly?
* * If Sheets("Input").Range("AE6").Value 0 Then
* * Mail_New_Version * * *'<-----run this sub macro
* * End If
* * If Weekday(Sheets("Input").Range("BF1")) = vbMonday _
* * * * * * *And Sheets("Input").Range("AE6").Value = 0 Then
* * * * Call MailToBobWeekly * * * '<---------run this sub macro
* * End If
Hey Sean
Try to debug, if
debug.print Weekday(Sheets("Input").Range("BF1"))
gives you the correct output or not.
The code looks fine for me.
hth
Carlo
|