D
David Walker
I converted an Excel 2000 spreadsheet to Excel 2007, to an xlsm file
(macros allowed). It has a very simple Worksheet Change macro stored in
the code "behind" one of the worksheets:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
' Balance entered?
If Target.Column = 5 Then Target.Offset(0, 1).Value = Date
' Amount paid entered?
If Target.Column = 11 Then Target.Offset(0, -1).Value = Date
End Sub
This macro shows up in the xlsm file when I right-click the worksheet tab
and select "View Code" in the context menu.
The file is password-protected, so I have to enter the password to open
it.
The macro doesn't run at all. I have tried putting a Stop command after
the Private Sub line, so I know the macro doesn't get called when I
change the value of a cell. It should get called for a change to any
cell on that worksheet.
What I have tried:
In the Trust Center, I have the path that this file comes from, listed in
the "Trusted Locations".
The Macro Settings are set to disable macros NOT in a trusted location,
WITH notification... this shouldn't apply, since the file is in a trusted
location, but I'm not getting notified anyway.
I have Message Bar set to tell me if content has been blocked.
I searched Google to try to find out what could cause this not to run the
same way in 2007 that it did in 2000.
Is there something I need to do, to turn on events in Excel 2007?
Thanks.
David Walker
(macros allowed). It has a very simple Worksheet Change macro stored in
the code "behind" one of the worksheets:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
' Balance entered?
If Target.Column = 5 Then Target.Offset(0, 1).Value = Date
' Amount paid entered?
If Target.Column = 11 Then Target.Offset(0, -1).Value = Date
End Sub
This macro shows up in the xlsm file when I right-click the worksheet tab
and select "View Code" in the context menu.
The file is password-protected, so I have to enter the password to open
it.
The macro doesn't run at all. I have tried putting a Stop command after
the Private Sub line, so I know the macro doesn't get called when I
change the value of a cell. It should get called for a change to any
cell on that worksheet.
What I have tried:
In the Trust Center, I have the path that this file comes from, listed in
the "Trusted Locations".
The Macro Settings are set to disable macros NOT in a trusted location,
WITH notification... this shouldn't apply, since the file is in a trusted
location, but I'm not getting notified anyway.
I have Message Bar set to tell me if content has been blocked.
I searched Google to try to find out what could cause this not to run the
same way in 2007 that it did in 2000.
Is there something I need to do, to turn on events in Excel 2007?
Thanks.
David Walker