CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: split long text ? help please

    See if this helps:
    Code:
    Option Explicit
    
    Private Sub Form_Load()
        Dim a$, x%
        a = "This   is   a         test."
        x = InStr(a, "  ")
        If x > 0 Then
          Do While InStr(a, "  ")
            a = Replace(a, "  ", " ")
          Loop
        End If
        MsgBox a
    End Sub
    This is a test.
    EDIT: Or, use a RichTextBox, and turn WORDWRAP on!
    Last edited by dglienna; October 29th, 2010 at 01:10 AM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured