Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel input mask for textbox | Excel Discussion (Misc queries) | |||
Need A date Mask format for a Textbox on UserForm | Excel Discussion (Misc queries) | |||
Input Mask | New Users to Excel | |||
Input Mask | Excel Programming | |||
Mask input in input boxes? | Excel Programming |