Excel- Type check- VBA coding

  Neet_8 21:02 31 Jan 08
Locked

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

Try

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 ??

Regards,

Simsy

  Simsy 22:43 31 Jan 08

the the full stop is 46

Apologies if I'm way off base!!

Regards,

Simsy

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

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

This abstract video touches on division in our technologic world

Best alternatives to iTunes for Mac | Best music players for macOS: Free your music from the…