Pop up warning message!

C

canix

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top