I would like a message box to display if one of my reception staff tries to check a customer in on a Monday or a Thursday between 15:30 and 17:30.
So I typed my times into excel and formatted the cell as a number to see how it was stored and then used those numbers in the following hoping that if it worked for one day I could simply add another if statement for the other day;
If Weekday(Date) =6 And Time() > 0.6458333333333 33 And Time() < 0.7291666666666 67 Then
Msgbox “Blah”
It doesn’t work. Any 2 of the 3 variables work but when I add the third I get nothing. I am guessing that you can’t use 3 variables in an and statement so I am hoping that somebody can point me in the right direction.
Thanks
So I typed my times into excel and formatted the cell as a number to see how it was stored and then used those numbers in the following hoping that if it worked for one day I could simply add another if statement for the other day;
If Weekday(Date) =6 And Time() > 0.6458333333333 33 And Time() < 0.7291666666666 67 Then
Msgbox “Blah”
It doesn’t work. Any 2 of the 3 variables work but when I add the third I get nothing. I am guessing that you can’t use 3 variables in an and statement so I am hoping that somebody can point me in the right direction.
Thanks
Comment