Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run procedure from worksheet change event | Excel Programming | |||
Validation Procedure with a worksheet change event | Excel Worksheet Functions | |||
to call procedure in a worksheet in a module | Excel Discussion (Misc queries) | |||
Running a procedure in a module on graph change | Excel Programming | |||
Calling an embedded items event procedure from within a normal module | Excel Programming |