View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default Check a sheet each time file opened?

I have the following in my sheet command.
--------------------------------------------------
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Cells(7, 7).Value = "Processed" Then
Range(Cells(6, 6), Cells(7, 7)).Select
Selection.ClearContents
End If
MsgBox "event happened", vbExclamation
End Sub
-------------------------------------------------
It is to remove what is in cell 6,6 through 7,7 if in cell 7,7 it has
"Processed". I have Excel 2002. It works when Excel is not open and you
open the file from Explore. How can I get it to check each time the file is
opened? Would checking every time the sheet is updated be too much and is
that possible? I have tried using the "Application.EnableEvents" but found
that I did not do it right and when I tested on office 2007 , it went into a
loop and locked Excel.

thanks in advance