René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

isNumeric [VBA]

option explicit

public sub is_numeric 

  dim v as variant

  v = "4.2"

  if isNumeric(v) then
     msgBox(v & " is numeric")
  else
     msgBox(v & " is not numeric")
  end if

  if isNumeric("-8.8") then
     msgBox("-8.8 is numeric")
  else
     msgBox("-8.8 is not numeric")
  end if

  if isNumeric("car") then
     msgBox("car is numeric")
  else
     msgBox("car is not numeric")
  end if

  dim l as variant
  l = "4909098950980929490921"

  if isNumeric(l) then
     msgBox("l is numeric")
  else
     msgBox("l is not numeric")
  end if
  

end sub
See also other VBA stuff