Run Part of a Code If Q

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I have a piece of Code (part of several within the same module) that
mails out a spreadsheet, but I only want it to action if the value in
SheetA1 = Monday (A1 will actually be =Now()). If the Value in A1 is
not = Monday I just want to skip over the code and execute the remaing
code.

How would I do that?

Thanks
 
If Weekday(Sheets("Sheet1").Range("A1")) = vbMonday Then
'do something
End If

Hth,
Merjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top