R
Rob
I was wondering how I can get VBA in Excel'03 to recognize that if today is
Tuesday the 17th, or Firday the 20th, then the previous Monday must have been
the 16th. Or is it is Friday April the 3rd then the previous Monday was
March 30th? Escentially I am just looking for a way to have the VB identify
what Day today is as well as the date and then calculate what the previous
Monday was... Unless the current day happens to actually be Monday, in which
case it just uses that date.
Dim tDate, mDate As Date
tDate = Format(Now(),"m/d/yyyy")
tDay = Day(tDate)
If tDay <> "Monday" Then mDate = tDate - tDay
The above code it what I toyed with but it has failed at every itteration I
made of it.
Thanks In Advance!
Tuesday the 17th, or Firday the 20th, then the previous Monday must have been
the 16th. Or is it is Friday April the 3rd then the previous Monday was
March 30th? Escentially I am just looking for a way to have the VB identify
what Day today is as well as the date and then calculate what the previous
Monday was... Unless the current day happens to actually be Monday, in which
case it just uses that date.
Dim tDate, mDate As Date
tDate = Format(Now(),"m/d/yyyy")
tDay = Day(tDate)
If tDay <> "Monday" Then mDate = tDate - tDay
The above code it what I toyed with but it has failed at every itteration I
made of it.
Thanks In Advance!