View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pierre via OfficeKB.com Pierre via OfficeKB.com is offline
external usenet poster
 
Posts: 5
Default userinput is wrong (check in vba)

Hi,

I have a number of txt_boxes in a userform where the user has to put in a
number like 2,5 (two and a half) or 25,7 for example.
If the user puts in 2.5 the application wille generate an error message.

I have two questions:

1. How can i make sure that the numer is always put in, using a "," instead
of a "." ?
if the user puts in eg 2.5 i need it to correct to 2,5 or set the
focus back to the field with an error message.
2. How can i make sure all the 10 fields are filled and if one is not filled,
to generate an error message and go to the first field that is not filled?

Thanks,
Pierre


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200509/1