Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need help for a code

ifti_khan01ifti_khan01 Member Posts: 3
Hi all
Can any body varify following code. when i use this code, there is a msg occur that method is wrong.

If IsNumeric(Amount.text) Then
LoanAmount = Amount.text
Else
Msgbox "invalid Value"
endif

thanks in advance

Comments

  • JomacJomac Member Posts: 231
    : Hi all
    : Can any body varify following code. when i use this code, there is a msg occur that method is wrong.
    :
    : If IsNumeric(Amount.text) Then
    : LoanAmount = Amount.text
    : Else
    : Msgbox "invalid Value"
    : endif
    :
    : thanks in advance
    :
    :

    What is the exact error that is returned?

    Try this anyway

    [code]
    Dim LoanAmount As Integer

    If IsNumeric(Amount.text) Then
    LoanAmount = CInt(Amount.text)
    Else
    Msgbox "invalid Value"
    end If
    [/code]

    Regards,
    ______
    [size=2][b][blue]J[/blue]omac.[/b][/size]

  • iddqd101iddqd101 Member Posts: 14
    : Hi all
    : Can any body varify following code. when i use this code, there is a msg occur that method is wrong.
    :
    : If IsNumeric(Amount.text) Then
    : LoanAmount = Amount.text
    : Else
    : Msgbox "invalid Value"
    : endif
    :
    : thanks in advance
    :
    :

    yea. You should convert the string value into numeric first.
    iddqd101
  • Andre YoungAndre Young USAMember Posts: 0

    _________ || http://forcoder.org || free video tutorials and ebooks about \ MATLAB PL/SQL Visual Basic Java Visual Basic .NET C# PHP Scratch R Python Swift Perl Go Ruby Objective-C C C++ Delphi Assembly JavaScript Transact-SQL Bash Rust Apex Awk Alice Scheme SAS Dart LabVIEW ABAP Ada Julia Prolog Lua D Fortran COBOL Scala Lisp VBScript Crystal Erlang Logo Hack F# Clojure Kotlin ML FoxPro \ ____________

Sign In or Register to comment.