Results 1 to 6 of 6

Thread: textbox question

  1. #1

    Thread Starter
    Hyperactive Member zer0_flaw's Avatar
    Join Date
    Apr 2001
    Posts
    448

    textbox question

    I have a textbox with a few lines of text in it. The problem is the first line of text is blank... I need to know how to remove it. For example, I want:

    1) blehbleh
    2) haha
    3) roflrofl

    but what I have in the text box is:

    1)
    2) blehbleh
    3) haha
    4) roflrofl

    Just ignore the line numbers... I just need to get rid of the first blank line in the textbox. Any help is appreciated. Later,

    -zer0 flaw

  2. #2
    Gerco
    Guest
    Text1.Text = "1) blabla" & vbcrlf & "2)rofl" & vbcrlf & "3)yaddayadda"

  3. #3

    Thread Starter
    Hyperactive Member zer0_flaw's Avatar
    Join Date
    Apr 2001
    Posts
    448
    No, my textbox already has 4 rows of text in it. I need to get rid of JUST the first row. Is that possible?

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Text1.Text = "Whatever" & Text1.Text
    2.  
    3. Text1.Text = Replace(Text1.Text, vbCrLf & vbCrlf, vbCrLf)

    does that work?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Hyperactive Member zer0_flaw's Avatar
    Join Date
    Apr 2001
    Posts
    448
    Here we go... lets see if anyone can do this: Can I open a file, delete the first line of text, and keep the rest of the text in the file?

  6. #6
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    VB Code:
    1. Text1 = Mid(sDataFromFile, Instr(sDataFromFile, vbCrLf) + 2)

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