RE: $$Excel-Macros$$ worksheet change event problem

2010-04-27 Thread Dave Bonallack
l sheets except the new one, which should be hidden. Regards - Dave. Date: Tue, 27 Apr 2010 13:10:16 +0800 Subject: Re: $$Excel-Macros$$ worksheet change event problem From: osav...@gmail.com To: excel-macros@googlegroups.com Thank you Dave, The code you suggested worked fine. Although i disc

Re: $$Excel-Macros$$ worksheet change event problem

2010-04-26 Thread OSA
Thank you Dave, The code you suggested worked fine. Although i discovered that the user can still open the file with macro disabled and change the cell content, save and reopen it. now I wish when the workbook is open, it checks the value of sheet1(D3) if equal to "BRIDGESTONE COMPANY INC." if ye

RE: $$Excel-Macros$$ worksheet change event problem

2010-04-26 Thread Dave Bonallack
Hi, Try this code instead: Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error Resume Next If Sheets("Sheet1").Range("D3") <> "BRIDGESTONE COMPANY INC." Then MsgBox " FILE WILL BE CLOSED!!", vbOKOnly + vbExclamation MsgBox "Please contact EDP " T