Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub TextBox1_Change()
TextBox1.MaxLength = "4" If IsNumeric(TextBox1) = True Then TextBox1 = UCase(TextBox1) Else TextBox1 = "" End Sub The above code i am using to ensure only a 4 digit numerical value is placed in the textbox. I actually want on EXIT only that value entered, but with a "A" before it. Like A4587 etc. I tried using : Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Textbox1.MaxLength="5" Textbox1.value = "A"+Textbox1.value End Sub But it clears the Textbox value Is there a way around this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count occurance of a leter in a text string | Excel Worksheet Functions | |||
Giving letters a numerical value, then adding the total. | Excel Discussion (Misc queries) | |||
Adding up non numerical values | New Users to Excel | |||
Adding numerical values based on multiple values in another column | Excel Worksheet Functions | |||
Adding numbers to an incomplete numerical list | Excel Discussion (Misc queries) |