Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Visual basic coding, how do I do this?

Under any event (button click, text changed etc.) how do I remove all "-" characters from a textbox?

My textbox is named Resultbox.

3 Answers

Relevance
  • 8 years ago
    Favorite Answer

    The Resultbox.text field is a regular VB string, so you can do anything with it that you can with any other string. See

    msdn.microsoft.com/en-us/library/dd789093.aspx

    The function you want is Replace:

    Resultbox.text = Replace(Resultbox.text, "-", "")

    More about Replace at:

    http://msdn.microsoft.com/en-us/library/microsoft....

  • Aleks
    Lv 6
    8 years ago

    me.Resultbox = replace(me.Resultbox,"-","")

  • Anonymous
    8 years ago

    resultbox.text = ""

Still have questions? Get your answers by asking now.