View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Event codes don't fire with change or calculate

When Sub Col_A() moves a short list of text or numbers up a row at a time, when the top entry of the list gets to A1, I need one of the event codes to fire so I can process the A1 entry.

Neither of these event codes work unless I manually enter something in A1, where the Change event works, or do a simple calculation in a cell =1+1 enter, then the Calculate event code works.

(Calc on the sheet settings is set to Automatic)

Howard


Sub Col_A()

Sheets("Sheet2").Range(Range("A1").End(xlDown), Cells(Rows.Count, "A").End(xlUp)).Cut Range("A1").End(xlDown).Offset(-1)

Sheets("Sheet2").Calculate
End Sub


Private Sub Worksheet_Calculate()

If Range("A1") < "" Then
MsgBox "A1 = " & [A1]
End If

End Sub


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Address < "$A$1" Then Exit Sub

MsgBox "A1 = " & [A1]

End Sub