borderAndreaVB free resources for Visual Basic developersborder
AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2017 Andrea Tincani
:: Removes upto the passed strCommand from a string...

Author  

David Costelloe

Language  

VB4, VB5, VB6

Operating Systems  

Windows 95, 98 and NT
Module

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

:: Navigation

Home

Beginners Corner

Previous Tip

Next Tip

:: Search this site
Google
borderAndreaVB free resources for Visual Basic developersborder
borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2017 Andrea Tincaniborder