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: 3
Default how to error-check text box values

I have a UserForm with multiple Text Boxes and a "Run" command button. The Text Box values can only be integers. I would prefer to check for non-integer values as they are being typed as opposed to validating them in the "Run" button's "click" handler.

To this end, I've setup "Change" event handlers for the Text Boxes that do the validation and display a MsgBox for illegal entries. Although this works as desired, the user is under no obligation to fix the entry- leaving it unchanged will not trigger a "Change" event. As a result, the "run" button could try to process bad data and an unhandled exception might occur.

I suppose I could just disable the "Run" button if any Text Box contains uncorrected bad data but I'm thinking there is a better design. Any suggestions will be welcome.

Thanks in advance.

-mike
 
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
Loop for text check in three colums and set a text code based on thisin another column [email protected] Excel Programming 4 April 17th 19 07:33 PM
check if any values on row Norvascom Excel Worksheet Functions 7 March 1st 10 04:56 AM
Loop through column(s) to check values, perform action based on check ward376 Excel Programming 4 November 6th 07 03:21 PM
Check Box Values Jasmine[_2_] Excel Programming 2 May 11th 04 08:25 PM
check variable(text) with cell (text), textbox Mark[_17_] Excel Programming 1 August 27th 03 01:15 PM


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