K
kblum
I have created a macro that runs through a bunch of cells adjusting dat
in other cells. I want this macro to be run whenever there is a chang
(DDE) in some cells, so I thought I would just put a cal
"Application.Run MyMacro
" in the Worksheet_Change event. However when I did that it resulte
in Out of Stack Space errors because the macro itself would change dat
on the worksheet. So I thought I would create a Public Variable in th
Workbook Global Declarations as "Public glRecChanges As Boolean", an
then put this in the Worksheet_Change event...
Code
-------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If !glRecChanges Then
glRecChanges = True
Application.Run "'CWServ NetDDE Test.xls'!RecordChanges"
glRecChanges = False
End If
End Su
-------------------
However it says that the glRecChanges is an "Invalid or Unqualifie
Reference".
What am I doing wrong?
TIA,
Ke
in other cells. I want this macro to be run whenever there is a chang
(DDE) in some cells, so I thought I would just put a cal
"Application.Run MyMacro
" in the Worksheet_Change event. However when I did that it resulte
in Out of Stack Space errors because the macro itself would change dat
on the worksheet. So I thought I would create a Public Variable in th
Workbook Global Declarations as "Public glRecChanges As Boolean", an
then put this in the Worksheet_Change event...
Code
-------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If !glRecChanges Then
glRecChanges = True
Application.Run "'CWServ NetDDE Test.xls'!RecordChanges"
glRecChanges = False
End If
End Su
-------------------
However it says that the glRecChanges is an "Invalid or Unqualifie
Reference".
What am I doing wrong?
TIA,
Ke