LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default MsgBox to validate an entry

I have created a user form that has a text box asking the user to enter an
employee ID number. Upon entry, the number is placed in cell C3 on the
spreadsheet. There is a VLOOKUP formula in cell C2 that goes to another
sheet (in the same workbook) and searches for the ID number and brings back
to cell C2 the cooresponding employee name.

If the number entered in the text box is not found then #N/A results in cell
C3.
I want to create a msgBox that would pop up as soon as an invalid number is
entered in the text box saying "Invalid Employee ID Number".

How do I get there?

My TextBox code is as follows:

Private Sub TxtEmployeeNumber_Change()
Range ("C3")=TxtEmployeeNumber.Text
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validate MsgBox Entry to Data in Cells David Excel Discussion (Misc queries) 13 December 21st 05 10:31 PM
Validate InputBox entry davidm Excel Programming 0 August 31st 05 03:03 AM
Validate textbox entry Stuart[_21_] Excel Programming 2 May 13th 05 07:31 PM
Validate Combobox entry MBlake Excel Programming 5 May 4th 05 08:39 PM
Validate Textbox entry David Seebaran Excel Programming 3 April 18th 04 06:26 PM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"