Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Input mask for userform textbox

I am tying to set up an input mask for a textbox in a userfrom.

The user will only be able to enter a 12 character string.
The string will look like GSSL########
All entries into this box must have GSSL at the beginning,
and the ######## represents any 8 digit number.

Is this even possible in Excel.

I have been trying to crack this for some time.

I am extremly new to VBA and i could be missing something simple.

Any help appriciated.
Axe.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Input mask for userform textbox

Hi

personally i would create a text box that required the user to only enter
the 8 digits, then on exit of the text box i would check the length and
whether or not it is a number, then i would append the GSSL bit myself
e.g.

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim snum As String
If Len(TextBox1.Value) < 8 Or
Application.WorksheetFunction.IsNumber(Val(TextBox 1.Value)) = False Then
MsgBox "Please ensure that number you enter has eight digits"
End If
snum = "GSSL" & TextBox1.Value
End Sub

Cheers
JulieD

"Axehandler" wrote in message
om...
I am tying to set up an input mask for a textbox in a userfrom.

The user will only be able to enter a 12 character string.
The string will look like GSSL########
All entries into this box must have GSSL at the beginning,
and the ######## represents any 8 digit number.

Is this even possible in Excel.

I have been trying to crack this for some time.

I am extremly new to VBA and i could be missing something simple.

Any help appriciated.
Axe.



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
excel input mask for textbox DaveF[_2_] Excel Discussion (Misc queries) 3 February 20th 08 04:25 PM
Need A date Mask format for a Textbox on UserForm [email protected] Excel Discussion (Misc queries) 2 November 4th 07 03:27 AM
Input Mask Jimmy Clay New Users to Excel 3 December 1st 04 02:16 AM
Input Mask Mark Harrison Excel Programming 3 December 3rd 03 02:45 PM
Mask input in input boxes? Eric[_14_] Excel Programming 4 November 29th 03 12:10 PM


All times are GMT +1. The time now is 03:34 PM.

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"