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
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:
- How do I make a text box on Myspace?Best solution by Yahoo! Answers
- What do I need to do to become a doctor?Best solution by Yahoo! Answers
- What do I need to do to become a police officer in New Jersey?Best solution by Yahoo! Answers
- What do I need to do to become a fireman?Best solution by Yahoo! Answers
- What are the main parts of visual basic 2005?Best solution by msdn.microsoft.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.