Command button help

Private Sub CommandButton3_Click()

      Range("B2").Value = Date - Weekday(Date, 3)
      Range("B3").Value = Date - Weekday(Date, 3) + 4

End Sub

If B2 equals the first monday of last week & B3 Friday

How do I alter the code so I get the first Monday of the current week?

i.e 17th & 21st
Who is Participating?
SANTABABYConnect With a Mentor Commented:
Date - Weekday(Date, vbMonday) + 1
CompProbSolvConnect With a Mentor Commented:
Does this work for you?
Range("B2").Value = Date - Weekday(Date+1, 3)+1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.