Data validation problems
Hi there, Been struggling with this all day and wondering if any finer minds than I could help out. I've created a user form that sends data (entered into a text box) back to a worksheet. What I'd like to do is restrict the entry of data to a specific format shown below: "Variable length text string"3 figures_"C" or "D"_Grid reference Obviously that doesn't read too well, some examples below: Banana002_C_C11 Mango105_C_E09 Pear067_D_A01 The grid reference range is A-H and 1-12. I need some kind of alert for this and to make matters worse there can be up to 10 entries (from different text boxes - they all get processed when an "OK" button is clicked) to loop through. In a perfect world if an entry is not in the correct format then the user then gets the option to change or ignore the entry (in which case it wouldn't get processsed further). Of course that might be a bit of overkill. Will carry on working on this tomorrow but am interested to see what people can work out. Thanks, Tris -- Tristan ------------------------------------------------------------------------ Tristan's Profile: http://www.excelforum.com/member.php...o&userid=34061 View this thread: http://www.excelforum.com/showthread...hreadid=538264 |
Data validation problems
Look in VBA help at the Like operator
-- Regards, Tom Ogilvy "Tristan" wrote in message ... Hi there, Been struggling with this all day and wondering if any finer minds than I could help out. I've created a user form that sends data (entered into a text box) back to a worksheet. What I'd like to do is restrict the entry of data to a specific format shown below: "Variable length text string"3 figures_"C" or "D"_Grid reference Obviously that doesn't read too well, some examples below: Banana002_C_C11 Mango105_C_E09 Pear067_D_A01 The grid reference range is A-H and 1-12. I need some kind of alert for this and to make matters worse there can be up to 10 entries (from different text boxes - they all get processed when an "OK" button is clicked) to loop through. In a perfect world if an entry is not in the correct format then the user then gets the option to change or ignore the entry (in which case it wouldn't get processsed further). Of course that might be a bit of overkill. Will carry on working on this tomorrow but am interested to see what people can work out. Thanks, Tris -- Tristan ------------------------------------------------------------------------ Tristan's Profile: http://www.excelforum.com/member.php...o&userid=34061 View this thread: http://www.excelforum.com/showthread...hreadid=538264 |
Data validation problems
Thanks for the pointer. Think I've got it licked. Cheer -- Trista ----------------------------------------------------------------------- Tristan's Profile: http://www.excelforum.com/member.php...fo&userid=3406 View this thread: http://www.excelforum.com/showthread.php?threadid=53826 |
All times are GMT +1. The time now is 06:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com