Search and delete
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts
Page 1 of 1
hello,
can anyone help me with a richtextbox
i want only the lines that contains a string word
for example:
hello how are you today bruno
o hej we doing fine
who's bruno?
we have no idea
so then i only want the lines that contains bruno
to show in a string.
so that i only have those 2 lines left
hello how are you today bruno
who's bruno?
anyone?
thanks
can anyone help me with a richtextbox
i want only the lines that contains a string word
for example:
hello how are you today bruno
o hej we doing fine
who's bruno?
we have no idea
so then i only want the lines that contains bruno
to show in a string.
so that i only have those 2 lines left
hello how are you today bruno
who's bruno?
anyone?
thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
This worked for me, I hope it's what you're looking for 

Code: Select all
Dim lines() As String
Dim count As Integer
For i = 0 To RichTextBox1.Lines.Count - 1
If RichTextBox1.Lines(i).Contains("bruno") Then
ReDim Preserve lines(count)
lines(count) = RichTextBox1.Lines(i)
count += 1
End If
Next
RichTextBox1.Clear()
If lines.Count > 0 Then
For i = 0 To lines.Count - 1
RichTextBox1.AppendText(lines(i))
If i < lines.Count Then RichTextBox1.AppendText(vbNewLine)
Next
End If
clapper; nice job
yes this is the part we looking for
thank you so much #comathi loove;
+rep
yes this is the part we looking for
thank you so much #comathi loove;
+rep
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023