![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2007
Posts: 8
Rep Power: 0
![]() |
'ErrMessage' is not declared
I am VB 2005 Student
I'm trying to validate some user input using the code provided in the textbook. It uses "ErrMessage" as shown in the code below: ' Validate input for January
If IsNumeric(txtJan.Text) Then
Dim sngValue As Single
sngValue = CSng(txtJan.Text)
If sngValue < 0 Then
txtJan.SelectAll()
e.Cancel = True
Else
e.Cancel = False
End If
Else
ErrMessage("The input must be a number")
e.Cancel = True
End IfI could use MessageBox.Show("blah blah blah") but the textbook uses ErrMessage as shown above. Gary Last edited by DaWei; Oct 23rd, 2007 at 1:23 PM. Reason: Added code tags. Read the rules. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling Maverik 6.2 (from C) | megamind5005 | C | 16 | May 3rd, 2006 5:41 PM |
| 'NULL' was not declared in this scope | titaniumdecoy | C++ | 9 | Mar 24th, 2006 3:00 AM |