View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill (Unique as my name) Bill (Unique as my name) is offline
external usenet poster
 
Posts: 10
Default Execute vba code on cell exit

I came up with this much, but it does nothing. Help me please?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static Oldselection As Range
If Oldselection = "Meter Reading" Then
SendKeys "{RIGHT 2}Bill Coyne{RIGHT}FM", True
End If
End Sub

I want to fill in "Bill Coyne" two cells to the right and "FM" three
cells to the right if the cell I exit equals "Meter Reading"

Thank you!