View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Brettjg Brettjg is offline
external usenet poster
 
Posts: 295
Default Worksheet Change event not running a macro

Hi Joel, thanks for your responses. The macro I'm calling works beautiffuly
from the
Private Sub APP1_reset_Click(). It's quite bizarre. Other parts of the
worksheet change macro work perfectly. In debugging I put a msgbox as the
first line in the macro I'm calling and that doesn't come up either. Even if
I deliberately call a macro that does NOT exist, it doesn't debug. That is to
say that it stops after the first msgbox any doesn't do anything after that.
Not sure if this makes it clearer to you or not. Brett


"joel" wrote:

You are running a macro in the personal.xls that may be failing. Add some
debug messages like this

rw = Target.Row
cl = Target.Column
spt_abs = Cells(rw + 1, cl + 1).Value
MsgBox "A = " & (rw + 25) / 39 & " Target.Value = " & Target.Value & "
SPLIT = " & (cl - 1) / 3
msgbox("Running Refinance")
Application.Run "PERSONAL.xls!RESET_REFINANCE", (rw + 25) / 39,
msgbox("finished Running Refinance")
Target.Value, (cl - 1) / 3
MsgBox "RETURN from RESET_REFINANCE"


"joel" wrote:

Make sure you have the Stop on Error setting in excel set properly so it will
display error messages

from VBA menu

Tools - Options - General - Error Trapping - Stop On all Errors


"Gary''s Student" wrote:

Can't see enough of your code. However make su

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
' your code
Application.EnableEvents = True
End Sub
--
Gary''s Student - gsnu200843


"Brettjg" wrote:

Hi, I have a worksheet cnage event which goes a certain distance and then
does nothing. The part of the code is:

rw = Target.Row
cl = Target.Column
spt_abs = Cells(rw + 1, cl + 1).Value
MsgBox "A = " & (rw + 25) / 39 & " Target.Value = " & Target.Value & "
SPLIT = " & (cl - 1) / 3
Application.Run "PERSONAL.xls!RESET_REFINANCE", (rw + 25) / 39,
Target.Value, (cl - 1) / 3
MsgBox "RETURN from RESET_REFINANCE"

The first Msgbox presents me with the correct values but then nothing at all
happens, and it doesn't matter if I have events on/off and calc on/off. I
know it doesn't run the RESET_REFINANCE macro because I've put an immediate
Msgbox in there which doesn't fire, and curiously it doesn't even debug if I
tell it to run a non-existent macro. The second Msgbox box "RETURN from
RESET_REFINANCE" doesn't fire either.

I do have a Private Sub APP1_reset_Click() but at the moment I've commented
it out to see if it was causing some interference. I also have a selection
change macro but commenting that out doesn't make any difference either.

At that point I need...............HELLLLLLLLLP please! Regards, Brett