User Form Controls

Z

Zaid Qureshi

(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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top