How to display a msg box while opening a sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a XLS file with many sheets in that. What I am looking for is - whenever that XLS file is opened (i mean any sheet) then if the file is opened for the first time in a NEW MONTH then a dialog box is displayed with a custom message and OK & cancel button. Pressing CANCEL would not display that message again for this given month but Pressing OK would display this message again and again until CANCEL.

This process should repeat for any new month.
Pls. someone help me write that type of program/macro.
 
If format$(Date,"MMMYYY") <> _
format$(sheets("Main").Range("A1"),"MMMYYYY")
then


-----Original Message-----
Hi,
I have a XLS file with many sheets in that. What I am
looking for is - whenever that XLS file is opened (i mean
any sheet) then if the file is opened for the first time
in a NEW MONTH then a dialog box is displayed with a
custom message and OK & cancel button. Pressing CANCEL
would not display that message again for this given month
but Pressing OK would display this message again and
again until CANCEL.
 
Thanx Sir,
But please let me know where should I place this code...I assume it is a macro.
Do I need any special value in any particular shell or a sheet for this to work.

Thanx again
 
Back
Top