Results 1 to 16 of 16

Thread: VB 6 - Useful Vb Functions

Threaded View

  1. #8

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: VB 6 - Useful Vb Functions

    IsNumeric()

    This function returns true if the selected item is Numberic (Numbers) and false if it is not.

    Use -

    VB Code:
    1. IsNumeric([Expression]) as boolean

    [Expression] Would be the item you were looking to see if it was numeric.

    Example -

    VB Code:
    1. If IsNumeric("78906") = True Then
    2.     MsgBox ("True")
    3. End If
    4.  
    5. 'The above statement would return the true msgbox
    6.  
    7. If IsNumeric("5566pp578") = True Then
    8.       MsgBox ("true")
    9. End If
    10.  
    11. ' This statement would not because the string we specified contains characters "pp"


    So this function returns true if a specified expresion is numerical and flase if it is not

    Note - It does also work for decimals so 0.8950 would return true
    Last edited by Pino; Feb 17th, 2005 at 12:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width