YellowLabPro
08-31-2007, 04:54 AM
This is a solution derived from one of our gurus here. I dont fully understand how it works, so I cannot troubleshoot this. It was working fine before, but I added some code, and this may be causing the error.
The variable i, is showing zero (0) value in the Locals window.
The line in red is the line breaking.
The jpg attached shows the function, and the locals window w/ pertinent info.
Function DelChar(Cel As Range, ParamArray CharPos())
Dim Tmp As String, i As Long
Tmp = Cel
Debug.Print Cel
For i = LBound(CharPos) To UBound(CharPos)
Tmp = Left(Tmp, CharPos(i) - 1) & Right(Tmp, Len(Tmp) - CharPos(i))
Debug.Print Tmp
Next
Cel.Value = Tmp
End Function
The variable i, is showing zero (0) value in the Locals window.
The line in red is the line breaking.
The jpg attached shows the function, and the locals window w/ pertinent info.
Function DelChar(Cel As Range, ParamArray CharPos())
Dim Tmp As String, i As Long
Tmp = Cel
Debug.Print Cel
For i = LBound(CharPos) To UBound(CharPos)
Tmp = Left(Tmp, CharPos(i) - 1) & Right(Tmp, Len(Tmp) - CharPos(i))
Debug.Print Tmp
Next
Cel.Value = Tmp
End Function