![]() |
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 |
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 |
All times are GMT +1. The time now is 09:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com