Public Function DWCStripAboveString(t$, strCommand$) As String
'*----------------------------------------------------------
'* Removes upto the passed strcommand$
'* Example '* strCommand$ = ","
'* t$ = "Hello, Andrea!"
'* DWCStripAboveString = " Andrea!"
'*----------------------------------------------------------
Dim i As Long
i = InStr(t$, strCommand$)
If i Then
DWCStripAboveString = Mid$(t$, i + 1)
t$ = Mid$(t$, i + 1)
Else
t$ = Trim$(t$)
If Len(t$) > 0 Then DWCStripAboveString = t$
End If
End Function |