Re: Textbox Question
- From: "TedF" <NoReply@xxxxxxxxxx>
- Date: Sat, 24 Dec 2005 15:47:38 -0800
if you need to add two spaces after a full stop then add
this line at the end of the loop
Text1.Text = Replace(Text1.Text, ". ", ". ")
Private Sub Command1_Click()
Do Until InStr(Text1.Text, " ") = 0
Text1.Text = Replace(Text1.Text, " ", " ")
Loop
Text1.Text = Replace(Text1.Text, ". ", ". ")
Do Until InStr(Text1.Text, vbCrLf & vbCrLf) = 0
Text1.Text = Replace(Text1.Text, vbCrLf & vbCrLf, vbCrLf)
Loop
End Sub
Private Sub Form_Load()
Text1.Text = " " & "test" & vbCrLf & vbCrLf & vbCrLf & " " & "test" &
vbCrLf & vbCrLf & vbCrLf
End Sub
"TedF" <NoReply@xxxxxxxxxx> wrote in message
news:%23296AbDCGHA.3920@xxxxxxxxxxxxxxxxxxxxxxx
> Private Sub Command1_Click()
> Do Until InStr(Text1.Text, " ") = 0
> Text1.Text = Replace(Text1.Text, " ", " ")
> Loop
> Do Until InStr(Text1.Text, vbCrLf & vbCrLf) = 0
> Text1.Text = Replace(Text1.Text, vbCrLf & vbCrLf, vbCrLf)
> Loop
> End Sub
>
> Private Sub Form_Load()
> Text1.Text = " " & "test" & vbCrLf & vbCrLf & vbCrLf & " " & "test" &
> vbCrLf & vbCrLf & vbCrLf
> End Sub
>
>
> <Johnny@xxxxxxx> wrote in message
> news:uk6pq1p0bhvqo6grl3g950uqqngsmhcmi9@xxxxxxxxxx
>> This should be easy but I am having difficulty. Say I have a text box
>> with a buch of text. The text could include double spaces as well as
>> multple vbCRLF. Say I want to go to the tenth word, How do I do it.
>> I cannot use the instr command becasue words can appear an unknown
>> number of times. I tried using an array with split and " " but the
>> multiple double sppacing and the vbCRLF
>>
>> THANKS
>
>
.
- References:
- Textbox Question
- From: Johnny
- Re: Textbox Question
- From: TedF
- Textbox Question
- Prev by Date: Re: Treeview help
- Next by Date: Re: Treeview help
- Previous by thread: Re: Textbox Question
- Next by thread: Re: Textbox Question
- Index(es):
Relevant Pages
|
Loading