Parting Text Function
Parting Text Function
Rate Parting Text Function
(1(1 Vote))
ByVal lLenPart As Long, _
Optional sDelimiter As String = " ", _
Optional bEnabledEvent As Boolean = True) As String
If Len(sText) = 0 Then GoTo NoParting
If lLenPart <= 0 Or lLenPart >= Len(sText) Then GoTo NoParting
Dim sMidText As String
Dim sTextOut As String
Dim sTemp As String
Dim lLen As Long
On Error GoTo NoParting
sTemp = Mid$(sText, 1, lLenPart)
For lLen = lLenPart + 1 To Len(sText) Step lLenPart
sMidText = Mid$(sText, lLen, lLenPart)
sTextOut = sDelimiter & sMidText
sTemp = sTemp & sTextOut
If bEnabledEvent Then DoEvents
Next
PartingText = sTemp
Exit Function
NoParting:
PartingText = sText
End Function
Parting Text Function Comments
No comments yet — be the first to post one!
Post a Comment