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: 2,836
Default Data Validation for TextBoxes

Im trying to figure out a way to add Data Validation for TextBoxes. Ive
used this technique befo
If TextBox1 = "" Then
MsgBox "Please enter a value for 'Name'!!"
Exit Sub
End If

However, Im not sure how to limit a TextBox to a range of numbers, such as
1-6. How can this be done? Also, how can I do it for many TextBoxes,
without specifically adding code for each?

A for Each€¦Next should do it, but I may need to add Data Validation for
several TextBoxes, such as 1-20, and then apply a slightly different set of
Data Validation rules for other TextBoxes, such as 1-4 for TextBoxes 21-25.
How would I go about doing that?

Thanks!!
Ryan---


--
RyGuy
 
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
code for conditional validation to textboxes tkraju via OfficeKB.com Excel Programming 6 June 5th 08 06:11 PM
Validation subroutine for textboxes chemicals Excel Programming 4 February 28th 08 07:57 PM
Delete Data from textboxes nir020 Excel Programming 2 November 26th 07 06:29 PM
Show Results in TextBoxes, ONLY if All TextBoxes have Data in them RyanH Excel Programming 3 November 19th 07 03:30 PM
format validation in UserForm textboxes Soultek Excel Programming 1 February 1st 07 07:37 PM


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