Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for something like BeforeChange event for Excel sheet

Status
Not open for further replies.

sfatz

Technical User
Nov 16, 2004
46
US
I have an Excel spreadsheet in which I want to review user changes via code. If the change is not acceptable, I would like to restore the original value in the changed cell.

I tried using the SheetChange event, but when I try to restore the old value, the event fires again, trying to restore the previous value (user entered value), which fires the event again, and so on, and so on ...

Can anyone suggest a technique/method to restore a previous value to a cell that a user has modified? I would like to keep in mind that the value may be a user entered formula.

Thanks in advance for all posts to my question.
 
simply play with the Application.EnableEvents property in your event procedure.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
duh? Boy, sometimes it just sits there staring you right in the face. Thx a bunch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top