Why can I only express myself in a text message?

I am using Visual Basic 2005 Express, and I need it to check if a text box is empty, and if so to have a message box appear displaying "ERROR" as a title, and a message of "Please enter a value into height", it only needs an OK button. What code do I use?

  • Answer:

    If TextBox.Text ="" then MessageBox.Show("Please enter a value into height", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End If

Anonymous at Answerbag.com Visit the source

Was this solution helpful to you?

Other answers

I don't know VB, but it shouldn't be much different from C#: if (textbox.Text == "") MessageBox.Show("ERROR: Please enter value into height."); This is the simplest use of a MessageBox, it has an OK button.

JimmyG

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.