I am developing an application and I use a 3rd party library which is basically Native excel. The problem is that this library does not implement an event which is able to notify me when the value of a cell value changes. Can I do it in my program and how?

(I thought that I could posible do sth like this :

end while
MsgBox("The value has changed")

but this is a very slow procedure so is there a better way or I will have to stick to this)

7 Years
Discussion Span
Last Post by papageorge

The problem with the above statement is this loop will run constantly looking for this new value. You could change this to a timer event where you can set the interval of how often it checks to see if the value has change but again this is something that will run in the background until it either finds the changed value or is explicitily coded to turn off. I prefer not to have things such as this run in the background whenever possibile (although sometimes it may be unavoidable). I'm not sure what your app is doing but if possible I would suggest something where the user clicks a control on your form when there ready to get/save the changes.


Create another class to encapsulate the third party library. This way you will be able to wire up events and handle any business logic when properties are being modified.

Edited by sknake: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.