View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Han[_3_] Han[_3_] is offline
external usenet poster
 
Posts: 7
Default Event: Workbook_Change or Worksheet_Change

Thank you both for your input. I forgot that it's not Workbook_Change,
but Workbook_SheetChange. Although, it does not explain why
Worksheet_Change didn't do anything. No matter, I will be using the
Workbook_SheetChange event.
--------------------------------------------------------------------
Just in case someone reads this later on, the parameter "ByVal Sh As
Object" is mandatory for the Workbook_SheetChange event. I receive a
compile error if it is not included. My final working code looks like
this:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)

If Target.Column < 19 Then Exit Sub
If Cells(Target.Row, Target.Column).Value = "B" Then
MsgBox "OMG! It works!"
End If

End Sub

Once again, thank you for you input!