by apollo » Sun Jan 11, 2015 1:11 pm
I'm having trouble running VBA code. BA is updating my Excel spreadsheet but the Worksheet_Change(ByVal Target As Range) function isn't being called. In order to investigate I've stripped the code down to the following - the worksheet it is attached to is called 'master'. It is the only instance of code attached to a worksheet and the only instance of code using a 'change' event. Other code is residing in modules as subroutines but isn't being called.
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox ("pre 16 count check")
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
MsgBox ("after 16 count check")
Application.EnableEvents = True
End If
End Sub
-----------
I can see the data being updated on the sheet but no 'msgbox' messages appear. I'm baffled. Anyone?