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
|