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


Dear Sir,

I prepared one Userform, I want to validate the text field like this.

SEP<SPACE 08 i.e. SEP 08 in capital letters.

what is the code for this purpose.

Waiting for your response..

Best Regards.

Syed Shahzad Zafar
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Validation for Textbox in Userform

If textbox1.text Like "[A-Z][A-Z][A-Z] ##" then
' match
else
' try again
end if

--
Tim Zych
www.higherdata.com
Compare data in workbooks and find differences with Workbook Compare
A free, powerful, flexible Excel utility


wrote in message
...

Dear Sir,

I prepared one Userform, I want to validate the text field like this.

SEP<SPACE 08 i.e. SEP 08 in capital letters.

what is the code for this purpose.

Waiting for your response..

Best Regards.

Syed Shahzad Zafar



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Validation for Textbox in Userform

I am pretty sure there is more to your question than you have posted, but to
answer the question you asked...

If TextBox1.Text = "SEP 08" Then
MsgBox "Valid entry"
End If

Just to take a guess at what your ultimate question may be, is the "SEP" an
abbreviation for a month? If so, and if you want to check that the input is
a 3-character for an actual month, consider this...

For X = 1 To 12
If TextBox1.Text = UCase(MonthName(X, True)) Then
MsgBox "Valid entry"
Exit For
End If
Next

Rick


wrote in message
...

Dear Sir,

I prepared one Userform, I want to validate the text field like this.

SEP<SPACE 08 i.e. SEP 08 in capital letters.

what is the code for this purpose.

Waiting for your response..

Best Regards.

Syed Shahzad Zafar


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
Data validation using TextBox in UserForm Chris Excel Programming 3 January 26th 07 08:37 AM
UserForm TextBox validation and focus Indiana Epilepsy and Child Neurology Excel Programming 2 July 7th 06 08:04 PM
putting validation to TextBox in the userform salihyil[_6_] Excel Programming 1 February 26th 04 12:10 PM
putting validation to TextBox in the userform salihyil[_8_] Excel Programming 1 February 26th 04 10:59 AM
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:47 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"