Community discussion forum

Replace text in textbox or file

This is a comment thread discussing Replace text in textbox or file
  • 10 years ago

    This thread is for discussions of Replace text in textbox or file.

  • 6 years ago

    Uh...just ran this code through VB and it doesn't work.  I'll have to make some changes to get it to work.  It's a good idea to replace text in a file, but for LARGE files (I normally deal with ext files that are 70,000+ pages when printed out) I think this app would crash and burn.  Just my opinion
    -- Joe --

  • 5 years ago

    I am certain it would crash in a file of that size.
    I am looking into getting a code that will do it for a 16 Gb file right now so I'm in the same boat as you

  • 1 year ago

    Yeahhhhh... You could use that, OR...

     

        Public Function Replace(ByVal TextToReplace As String)
            Try
                TextBox1.Text = TextBox1.Text.Replace(TextToReplace.ToString, "") 'Replace the string with nothing
            Catch ex As Exception
                Throw ex
            End Try
        End Function

     

    'Usage Below

    Replace(".exe","") 'Replaces .exe with nothing - I origionally used this for multiple process killing =)

     

    -Recon92

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback