Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

How to extract from info from textbox ?

$
0
0
Hello,

I have a textbox and I want to extract only last 90 characters from it

example

Code:

Client-002: Found-ada561aede0bb0fd867dc9341b9a9e6e2f3862cc:003537900496778600:070401090308010208000208060706
so I only want to extract last 90 characters which are

Code:

ada561aede0bb0fd867dc9341b9a9e6e2f3862cc:003537900496778600:070401090308010208000208060706
my code now only delete first 20 characters

Code:

Private Sub Command1_Click()
Dim txt As String, SearchTxt As String
    Dim Pos As Long, CurPos As Long, CurSel As Long
   

    rtbText.Text = rtbChat.Text
    rtbChat.SetFocus
   
    SearchTxt = "Found-"
   
    CurPos = rtbChat.SelStart
    CurSel = rtbChat.SelLength
   
    txt = rtbChat.Text
    Pos = InStr(1, txt, SearchTxt) - 1
   
    If Pos > -1 Then
        rtbChat.SelStart = Pos
        rtbText.Text = rtbChat.Text
        rtbText.SelStart = 0
        rtbText.SelLength = 20
        rtbText.SelText = ""
       
  End If
End Sub


Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>