Run procedure in stored in module on worksheet change event

  • Thread starter Thread starter Daniel Jones
  • Start date Start date
D

Daniel Jones

Guys-

Is there a way to run a procedure thats stored in a module on a
worksheet change event? When cell J1 changes, I'd like to run the
procedure ChangeRows() which is stored in a module. However, this
does not seem to be calling the procedure. Can anyone help? Thanks!


Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address

Comment here
Case "$J$1"

Call ChangeRows

Case Else
End Select
End Sub
 
Daniel,

Try it like this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$J$1" Then

Call ChangeRows

End If
End Sub

Mike
 
Daniel,

Try it like this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$J$1" Then

Call ChangeRows

End If
End Sub

Mike

Thank you, I actually tried that too, and that doesn't work either.
For some reason, its just not calling ChangeRows and I'm not sure
why. Can anyone solve the mystery? Thanks!

D
 
Does your code compile? Have you stepped through the code with F8 to see what
is going on? Do you have a break point / message box to ensure that the
change code is being called at all?
 
just a thought (cuz it happened to me!) - Target.Address is case
sensitive.
$j$1 won't trigger.
:)
susan
 
Jim-

I did try most of those debugging steps. I think it has to do with
another add-in that was trying to run when the worksheet was changed.
I tried this on a blank worksheet where the add-in was not being used
and it worked fine. Thanks for your help!

Daniel
 
Back
Top