Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Controls
(1) Use VBA code to restrict the input to numbers like so: (assuming that the textbox is called textbox1) if Not IsNumeric(Textbox1.Text) then msgbox "You must only enter numbers" TextBox1.Text = Empty End if (2) Set the MaxLength property of the textbox to 4 to restrict the length to a 4 character input. Zaid Qureshi -----Original Message----- Hi all, Is it possible within a excel user form to set a text box to: 1) only accept numbers 2) only accept a set number of characters Ie the user can only input a 4 number code. Ben E . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lost Form Controls | Excel Discussion (Misc queries) | |||
Form controls in Excel 07 | Excel Discussion (Misc queries) | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
User Form Controls | Excel Programming | |||
user form controls | Excel Programming |