View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Zygan
 
Posts: n/a
Default restricting use of certain characters


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.Replace What:="/", Replacement:="-", LookAt:=xlPart, SearchOrder
_
:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False

End Sub


place this in the workbook selection change macro it will continually
search the document and replace / with -
hope this helps


--
Zygan
------------------------------------------------------------------------
Zygan's Profile: http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=548822