Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open event to call procedure ONLY on Monday
Hello everyone. I would like to create a workbook open event that calls a
procedure within the same workbook ONLY if the workbook is opened on a Monday. All other days the open event would call nothing. Is this possible? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open event to call procedure ONLY on Monday
Private Sub Workbook_Open()
If Weekday(Date, vbMonday) = 1 Then Call DramaticMacro End If End Sub HTH. Best wishes Harald "Steph" skrev i melding ... Hello everyone. I would like to create a workbook open event that calls a procedure within the same workbook ONLY if the workbook is opened on a Monday. All other days the open event would call nothing. Is this possible? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open event to call procedure ONLY on Monday
Have you considered using the WEEKDAY worksheet function in your worksheet_open event? You would put this in the "ThisWorkbook"
module. Your code would start with: Private Sub App_WorkbookOpen(ByVal Wb As Workbook) dyDay = Weekday(Now(), 1) If dyDay = 2 Then ' some code here End If End Sub -- RMC,CPA "Steph" wrote in message ... Hello everyone. I would like to create a workbook open event that calls a procedure within the same workbook ONLY if the workbook is opened on a Monday. All other days the open event would call nothing. Is this possible? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where else to look for procedure call | Excel Programming | |||
Workbook.Open Event Procedure not firing | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming | |||
call procedure | Excel Programming | |||
procedure won't call | Excel Programming |