View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default How do I set this up

Hi,

You could do this which checks if it's a Monday and if the Mondays date
isn't in sheet 1 A1 amd then calls tour macro. It prevents a second run by
writing the date to a1

Private Sub Workbook_Open()
If Weekday(Date) = 1 And Sheets("Sheet1").Range("A1").Value < Date Then
Sheets("Sheet1").Range("A1").Value = Date
Call MyMacro
End If
End Sub


Mike
"Ayo" wrote:

I want to setup a macro, in a file, that only run once on a specific day of
the week regardless of who first open the file. The macro needs to run only
once, every monday, the first time the file is open. Any subsequent opening
of the file after that, the macro should not run.
How do I go about setting this up? I just need someone to point me in a
generally direction and I should be able to take it from there.
Thanks
Ayo