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 Preventing incorrect data from being copied

I have a user form that has three text boxes along with an OK command and a
Cancel command. The first textbox is an employee ID number, the next two are
dates. The Employee ID is entered and then a VLOOKUP formula goes to another
worksheet and finds the employee name and other data. If it doesn't find a
name I have written into the formula to enter "Invalid Employee Number" in
the cell.

Here is the situation:

If an invalid employee number is entered and the user doesn't notice bofore
clicking OK, the "invalid" data is copied to another hidden worksheet and it
is just a sheet of errors since the employee number wasn't valid.
OR
If the user enters a valid number, but doesn't notice until he/she hits OK
that the wrong employee number was entered, then that wrong employee data is
copied to the hidden worksheet.

What is the best way to prevent either of these from getting copied before
the user is certain the correct employee number is entered?

I attempted to create a MsgBox at the first Input box asking "Is this the
Correct Employee Number?". However the message box appeared after a single
digit was entered. For example if the employee number is 1554, the message
box popped up when you type 1, not at the end of typing 1554.

What do you experts suggest????
 
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
Disable spreadsheet when copied to incorrect file path or differen ip address Schatzi Excel Discussion (Misc queries) 4 April 29th 11 02:58 PM
Preventing data input until a particular cell is used R Excel Worksheet Functions 3 September 4th 09 01:26 PM
Preventing Data Import eileenj Excel Discussion (Misc queries) 0 August 9th 06 03:50 AM
Preventing duplicate data tillytee1 Excel Discussion (Misc queries) 2 March 20th 06 03:49 PM
Preventing a workbook from being copied CiaraG[_4_] Excel Programming 1 March 4th 04 01:24 PM


All times are GMT +1. The time now is 12:33 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"