[quote user="blumax57"]in userform macro there is a textbox box
when I insert positive number working error with negative value[/quote]
As I may have mentioned, VBA developers in Excel, Word and Access have solved many such problems many times over. Here are some examples...
- Making VBA Form TextBox accept Numbers only (including +, - and .)
- Accepting numbers only in user forms (VBA)
Note that they check the text for validity on the _Exit event, not the _Change event. You will find many similar discussions on newsgroups that deal with VBA for Office applications.