View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bill P Bill P is offline
external usenet poster
 
Posts: 7
Default Excel treating text as function

Thanks for the help. I've developed a workaround that supresses the
function error message, but does not produce the ideal behavior.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = True

If Strings.Left(Target.Value, 1) = "-" Then
Target.Value = "-"
Exit Sub
End If

Application.EnableEvents = False

' Rest of validation...
End Sub

It sounds like it may not be possible to prevent Excel from treating
that as a formula. Oh well...

- Bill