Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default putting validation to TextBox in the userform

hello guys

i use userform to autofilter the data from the list. when i put th
username it just filters the usernames details.

Question:
does anyone know how to put validation to textbox. eg just letters. i
end-user puts number, i want system to show an error message.

and also if the text that will be put in textbox does not exist i
(data,list)i want system to show error messege.

if you can help i will appriciate guys

thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default putting validation to TextBox in the userform

I think this is along the right lines...

Private Sub textbox1_KeyPress(ByVal KeyAscii As _

MSForms.ReturnInteger)

If Not IsNumeric(Chr(KeyAscii)) Then
msgbox "Please only use numbers"
KeyAscii = 0
End If

End Sub

Hope it is of some use

--
Message posted from http://www.ExcelForum.com

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
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM
Help with Syntax UserForm TextBox John Wilson Excel Programming 1 July 28th 03 04:15 PM
Userform Textbox in Password Validation golf4 Excel Programming 3 July 28th 03 02:27 PM
Populating Textbox in UserForm Derek[_2_] Excel Programming 3 July 10th 03 10:41 PM


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