View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JA[_3_] JA[_3_] is offline
external usenet poster
 
Posts: 8
Default Macro to remove ";"

This macro suggested for my previous question is
returning the error sub or function not defined.
Can some tweak it for me.

Sub Test()

Dim NewStr As String

NewStr = Replace(MyStr, ";;", ";")
If Mid(NewStr, 1, 1) = ";" Then NewStr = Right
(NewStr, Len(NewStr) - 1)
If Right(NewStr, 1) = ";" Then NewStr = Left(NewStr,
Len(NewStr) - 1)
If InStr(NewStr, ";;") Then NewStr = Clean(NewStr)
SemiClean = NewStr


End Sub