Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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
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
Where else to look for procedure call Lulu Excel Programming 0 November 24th 04 03:07 PM
Workbook.Open Event Procedure not firing Gordon Rodman Excel Programming 1 October 17th 03 05:03 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM
call procedure bob Excel Programming 1 August 9th 03 12:40 AM
procedure won't call John Gittins Excel Programming 0 August 5th 03 08:17 PM


All times are GMT +1. The time now is 04:36 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"