View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default I'll try one last time. :(

Hi,

this fixes it so that the text box is deleted whenever the selection
change occurs, not just another selection in column 5...


Public ShpMsg As Shape
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
ShpMsg.Delete
If ActiveCell.Column = 5 And ActiveCell.Value < "" Then
Set ShpMsg = Me.Shapes.AddTextbox(msoTextOrientationHorizontal, _
ActiveCell.Left, ActiveCell.Top, 0, 0)
ShpMsg.TextFrame.Characters.Text = ActiveCell.Value
ShpMsg.TextFrame.AutoSize = True
End If
End Sub

Ken Johnson