View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default isnumeric() and hyphen

So that you can enter negative numbers???

John Smith wrote:

Why does isnumeric() treat hyphen differently than it does other
letters? In the following code, the first hyphen does not trigger
the msgbox, though alphabets do. So is the second hyphen.

sub textbox1_change()

if NOT isnumeric(textbox1.value) then
Msgbox ("You must enter a number.")
end if
end sub


--

Dave Peterson