ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Question (https://www.excelbanter.com/excel-programming/341242-date-question.html)

StephanieH

Date Question
 
I have a macro that shoots me a reminder if today is Friday. Is it possible
to specify if today is the first weekday of the month?

K Dales[_2_]

Date Question
 
Select Case Weekday(Date(),2) ' Monday=1, ... Sunday=7
Case 1
If Day(Date())<4 Then Call Alert() ' If Monday the 1st, 2nd or 3rd must
be 1st day of month
Case 2 To 5
If Day(Date())=1 Then Call Alert() ' Any other weekday, only if 1st of
month
End Select

Alert() would be a sub used to alert you
--
- K Dales


"StephanieH" wrote:

I have a macro that shoots me a reminder if today is Friday. Is it possible
to specify if today is the first weekday of the month?


StephanieH

Date Question
 
Thanks K.



"K Dales" wrote:

Select Case Weekday(Date(),2) ' Monday=1, ... Sunday=7
Case 1
If Day(Date())<4 Then Call Alert() ' If Monday the 1st, 2nd or 3rd must
be 1st day of month
Case 2 To 5
If Day(Date())=1 Then Call Alert() ' Any other weekday, only if 1st of
month
End Select

Alert() would be a sub used to alert you
--
- K Dales


"StephanieH" wrote:

I have a macro that shoots me a reminder if today is Friday. Is it possible
to specify if today is the first weekday of the month?



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

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