Excel- Type check- VBA coding

  Neet_8 21:02 31 Jan 08

I have created a user form in which i have added VBA coding to prevent the possibility of the user being able to insert letters into the field. At current i have inserted the following cases:
Case 32, 48 To 57

What case do i need to insert in order to allow the user to insert a dot ('.') into a text box on a user form. This field is for a price and therefore, a dot is required so that the price can be separated and placed to two decimal places-e.g. 45.99

Thanks your help would be appreciated!

  VoG II 21:18 31 Jan 08


Case 32, 46, 48 To 57

but it might be better to invert your logic and exclude the ANSI codes for numbers - 48-57.

  VoG II 21:20 31 Jan 08

Ignore my last comment - I was thinking of another similar question.

  Simsy 22:25 31 Jan 08

keyascii ??



  Simsy 22:43 31 Jan 08

the the full stop is 46

Apologies if I'm way off base!!



This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Animator Emanuele Kabu’s psychedelic video is a stunning tribute to Lisbon city

Best Mac antivirus 2017