Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pop up warning message!


I have a monthly workbook log and a sheet for each week. I want to pu
a warning pop up message when user open the workbook not designed fo
the month compare to the current system date. For example, user wan
open a sept workbook log and today is only august, so it will popup
warning message to tell user that they need to open the workbook fo
august instead. And possiblly a popup message for each weekl
worksheet as well

--
cani
-----------------------------------------------------------------------
canix's Profile: http://www.excelforum.com/member.php...fo&userid=2596
View this thread: http://www.excelforum.com/showthread.php?threadid=39338

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Pop up warning message!

Use the workbook_open event

See Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm

Private Sub Workbook_Open()
if year(date) < 2005 and month(date) < 6 then
msgbox "This workbook is only for Jun 2006"
if Application.Username < "canix" then
thisworkbook.close Savechanges:=False
end if
end if
End Sub

--
Regards,
Tom Ogilvy


"canix" wrote in
message ...

I have a monthly workbook log and a sheet for each week. I want to put
a warning pop up message when user open the workbook not designed for
the month compare to the current system date. For example, user want
open a sept workbook log and today is only august, so it will popup a
warning message to tell user that they need to open the workbook for
august instead. And possiblly a popup message for each weekly
worksheet as well.


--
canix
------------------------------------------------------------------------
canix's Profile:

http://www.excelforum.com/member.php...o&userid=25962
View this thread: http://www.excelforum.com/showthread...hreadid=393383



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
Warning Message bollard Excel Worksheet Functions 6 September 12th 07 05:59 PM
warning message allan Excel Discussion (Misc queries) 2 March 5th 07 03:20 AM
How to I get a warning message box shrek Excel Worksheet Functions 3 November 10th 05 12:23 AM
Warning message Paul Excel Discussion (Misc queries) 1 March 11th 05 11:07 PM
warning message Delali Excel Programming 1 June 25th 04 06:40 PM


All times are GMT +1. The time now is 04:06 PM.

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

About Us

"It's about Microsoft Excel"