|
On 25 Okt, 12:44, "PinkLab " <hussain...@hotmail.com> wrote:
> doesn't work....
>
> i need to enter the simple code in text box call to define it should only accept numeric values otherwise display error message.....
>
> any help please?
Don't top post!
ISNUMERIC probably doesn't work because it tests the data type,
not contents. What you enter in a text box is necessarily text.
So either
1) Try and convert the text to a numeric value using STR2INT,
STR2NUM or SSCANF and test if the conversion was successful.
2) Use a regular expression first and check if the entered text
contains a valid number.
Rune
> "Wayne King" <wmkin...@gmail.com> wrote in message <hc1c75$id...@fred.mathworks.com>...
> > "PinkLab " <hussain...@hotmail.com> wrote in message <hc189h$t...@fred.mathworks.com>...
> > > How do I program to accept only numeric values for my edit text box? Please help
>
> > Hi,
> > Will using isnumeric() work for you?
> > >>doc isnumeric
>
> > wayne– Skjul sitert tekst –
>
> – Vis sitert tekst –
|