PDA

Click to See Complete Forum and Search --> : Trouble with set objects when using withevents


jeff@matav.net.il
Jan 24th, 2001, 11:57 AM
I wrote a com addin for Excel that compares the cells of the active sheet to a version of the workbook that the user chooses from a list. When a cell value is different than in the version I display the value of the version in a comment of the cell in the active sheet. Everything works. Then I had to add a function to delete my comments when the workbook is closed.
I tried adding withevents to my application object which deletes the comments when the workbook(s) close but my variable that holds the version workbook (when the withevents keyword is omitted) now holds the same workbook (the first one), so all the values are the same because it compares the same sheet(the first). I also tried making a 2nd project for the close event but when I run them both, one or the other (coms) doesn't work.
Thanks