Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with textbox change event
Hello
I dont even know if this is possible but here goes! I am trying to block the user entering a number which begins with 0 (zero) into the textbox. Plain english version of code might be Private Sub TextBox1_Change() If First character in textbox is 0 then MsgBox "choose a number NOT starting with 0" Clear textbox EndSub Please dont mock my obvious lack of knowledge!! Kenny Excel 2000 and 97 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with textbox change event
This should do it Code ------------------- Private Sub TextBox1_Change() If Len(TextBox1.Text) = 1 Then If TextBox1.Text = 0 Then MsgBox "Choose a number NOT starting with 0" TextBox1.Text = "" End If End If End Su ------------------- -- kkkni ----------------------------------------------------------------------- kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754 View this thread: http://www.excelforum.com/showthread.php?threadid=26936 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Action Event, CheckBox, Add Row and Textbox | Excel Discussion (Misc queries) | |||
How can I expose the TextBox BeforeUpdate event to my user class? | Excel Discussion (Misc queries) | |||
Textbox change event | Excel Programming | |||
MSForms.TextBox Exit event isn't available in Excel class mosule | Excel Programming | |||
event which occurs when a TextBox receives focus | Excel Programming |