Application events
okaizawa,
Thank you very much, once i identified that i moved other classing to a
seperate class module and that solved everything!!! thanks much
Ben
--
When you lose your mind, you free your life.
"okaizawa" wrote:
Hi,
there might be many instances of the class possibly.
it could be checked by the following.
if all addresses are the same, there is one instance.
'your class module
'Add this line at the top of the module
Private cnt As Long
Private Sub App_SheetChange(ByVal wks As Object, ByVal target As Range)
If resaleactive = 0 Then Exit Sub
worksheetchange wks, target
'Add this line
cnt = cnt + 1
Debug.Print "variable address:", ObjPtr(Me), cnt
End Sub
--
HTH
okaizawa
ben wrote:
I have an App_sheetchange sub that catches changes to all worksheets and
decides which sub to call based on which sheet, it catches the changes and
evaluates all right, only problem is it repeats itself multiple times (43 to
be exact) on one little sheet change.
Private Sub App_SheetChange(ByVal wks As Object, ByVal target As Range)
If resaleactive = 0 Then Exit Sub
worksheetchange wks, target
End Sub
Sub worksheetchange(wks As Worksheet, target As Range)
MsgBox target.AddressLocal
End Sub
for some reason when stepping through after the end sub command for
worksheetchange it will loop right back the command that called it and repeat
that for quite a while then just end inexplicably
any thoughts on why?
|