Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Getting a macro to perform a function on a certain day every week.

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Getting a macro to perform a function on a certain day every week.

If Weekday(Date, vbSunday) = 3 Then MsgBox "Produce the Tuesday Report."

--

Vasant

"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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a function to perform this operation? Ayo Excel Discussion (Misc queries) 2 July 17th 09 03:17 AM
I cannot perform this function PLEASE HELP! Sunny Excel Worksheet Functions 5 March 10th 08 08:20 PM
What function does ^ perform in a formula Mickford Excel Worksheet Functions 1 October 15th 07 06:25 PM
perform 1 function, stop, perform different function nastech Excel Discussion (Misc queries) 0 August 22nd 06 12:21 PM
How to perform the following function in Excel? Eric Excel Worksheet Functions 3 March 5th 06 02:21 PM


All times are GMT +1. The time now is 08:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"