Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Run procedure in stored in module on worksheet change event

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Run procedure in stored in module on worksheet change event

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 Jones" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Run procedure in stored in module on worksheet change event

On Jul 30, 12:55*pm, Mike H wrote:
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 Jones" wrote:
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


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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Run procedure in stored in module on worksheet change event

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?
--
HTH...

Jim Thomlinson


"Daniel Jones" wrote:

On Jul 30, 12:55 pm, Mike H wrote:
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 Jones" wrote:
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


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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Run procedure in stored in module on worksheet change event

just a thought (cuz it happened to me!) - Target.Address is case
sensitive.
$j$1 won't trigger.
:)
susan


On Jul 30, 1:02*pm, Daniel Jones wrote:
On Jul 30, 12:55*pm, Mike H wrote:





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 Jones" wrote:
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


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- Hide quoted text -

- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Run procedure in stored in module on worksheet change event

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

On Jul 30, 1:58*pm, Susan wrote:
just a thought (cuz it happened to me!) - Target.Address is case
sensitive.
$j$1 won't trigger.
:)
susan

On Jul 30, 1:02*pm, Daniel Jones wrote:



On Jul 30, 12:55*pm, Mike H wrote:


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 Jones" wrote:
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


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- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run procedure from worksheet change event ranswert Excel Programming 1 January 17th 08 07:49 PM
Validation Procedure with a worksheet change event Bhupinder Rayat Excel Worksheet Functions 2 October 3rd 07 05:18 PM
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 09:39 PM
Running a procedure in a module on graph change tobriant[_8_] Excel Programming 0 November 7th 05 06:49 PM
Calling an embedded items event procedure from within a normal module jase[_2_] Excel Programming 3 June 13th 05 01:56 PM


All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"