Hi,

I'm trying to save the active workbook whenever a cell is changed. I've found a few different ways of doing it online, but none of them seem to be working for me. Here is an example:
Sub Worksheet_Change(ByVal Target As Range)
    Dim BkpTgt As Range, RangeToWatch As Range, Cel As Range
    Dim MustSave As Boolean
    'set here which cells' change initiates saving of the workbook
    Set RangeToWatch = Range("A1:A10,D11,F:F")
    'if the changed cell is not part of the watched range, exit
'    If Intersect(Target, RangeToWatch) Is Nothing Then Exit Sub
    
    'Examining each cell that has changed AND, ALSO, is part of the watched range
    For Each Cel In Intersect(Target, RangeToWatch).Cells
        'defining the backup area of the changed cell(s)
        Set BkpTgt = ThisWorkbook.Sheets("backup").Range(Cel.Address)
        'checking if it has changed
        If Cel.Value <> BkpTgt.Value Then
            MustSave = True
            'backing up the changed value
            BkpTgt.Value = Target.Value
        End If
    Next
    If MustSave Then thisworkbook.save
End Sub
The guys on the forum said it was working, but for some reason I can't get it to run. It seems at though it doesn't even enter the code at all, because I put a break point right at the beginning and nothing happened.

Another example I found was:
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Hey! Cell " & Target.Address(0, 0) & " just changed!", , "FYI"
End Sub
But again, it doesn't seem at though VBA ever tries to execute this code.

Any help would be greatly appreciated!

Thanks

Mike