Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Userform Validation

I have TextBox1,TextBox2, and TextBox3.

What is the code that will throw up a message box error
saying "cannot continue" if textbox1 and textbox2 do NOT
contain a number?

Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default Userform Validation

On Sat, 13 Dec 2003 14:11:35 -0800, Todd Huttenstine wrote:

I have TextBox1,TextBox2, and TextBox3.

What is the code that will throw up a message box error
saying "cannot continue" if textbox1 and textbox2 do NOT
contain a number?

Todd Huttenstine


Something like this, perhaps?

Private Sub TextBox1_Change()
If Not IsNumeric(TextBox1.Text) Then
MsgBox "Cannot continue"
Exit Sub
End If
'...
End Sub

--
auric "underscore" "underscore" "at" hotmail "dot" com
*****
To be or not to be. That is the result of 2b.
  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Userform Validation

thanx
-----Original Message-----
On Sat, 13 Dec 2003 14:11:35 -0800, Todd Huttenstine

wrote:

I have TextBox1,TextBox2, and TextBox3.

What is the code that will throw up a message box error
saying "cannot continue" if textbox1 and textbox2 do NOT
contain a number?

Todd Huttenstine


Something like this, perhaps?

Private Sub TextBox1_Change()
If Not IsNumeric(TextBox1.Text) Then
MsgBox "Cannot continue"
Exit Sub
End If
'...
End Sub

--
auric "underscore" "underscore" "at" hotmail "dot" com
*****
To be or not to be. That is the result of 2b.
.

Reply
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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM
Data Validation Cell - Move to UserForm thom hoyle Excel Worksheet Functions 0 April 28th 05 12:23 AM
Userform Date validation David Goodall Excel Programming 6 August 19th 03 11:46 PM
Userform Textbox in Password Validation golf4 Excel Programming 3 July 28th 03 02:27 PM


All times are GMT +1. The time now is 04:10 AM.

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

About Us

"It's about Microsoft Excel"