View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Getting a macro to perform a function on a certain day every week.

if weekday(date,vbSunday) = 3 then
msgbox "It's Tuesday"
End if

--
Regards,
Tom Ogilvy


"Ian M" wrote in message
om...
I run a macro daily in an Excel Workbook to produce certain data.

However, every Tuesday I have to get the macro to perform an extra
task which I do not require it to perform on any other day say, for
example, for a message box to appear saying "Produce the Tuesday
Report".

How can I write an extra clause so that if I run the macro on a
Tuesday the message box will appear, but if I run the macro on any
other day, it will not.