Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While calling sub procedure its giving error
#1
Not Solved
Hi There,
I had written the following simple VB script.
while calling sub procedure its giving type mismatch with the line "msgbox "val is" & result"....where did I make the mistake?

Code:
Sub result(val)
   If val=0 Then
    msgbox "its zero"
    elseif val=1 then
    msgbox "its one"
    elseif val=2 then
    msgbox "its two"
   else
   msgbox"out of range"
   end if
end sub

sub  getval()
      val3 = inputbox("enter the val")
[color=#FF0000]msgbox "val is" & result(val3)[/color][b]
End sub

getval()

Thanks,
[/b]
Reply


Messages In This Thread
While calling sub procedure its giving error - by Akhila - 10-21-2012, 09:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  calling QTP script from one to another krishnas.tester 3 6,807 11-12-2014, 10:32 AM
Last Post: vinod123
  GetVisibleText giving Junk Values anushreebehura 1 2,917 04-02-2013, 10:27 AM
Last Post: K Gaurav Varshney
  calling stored procedure from Oracle borisk 3 6,515 03-19-2013, 12:41 PM
Last Post: gaveyom
  Function is not calling from subdriver qtpexpert 0 2,076 01-18-2013, 12:25 PM
Last Post: qtpexpert
  Calling dll C# in VBScript nacchio 0 3,167 10-11-2011, 07:32 PM
Last Post: nacchio

Forum Jump:


Users browsing this thread: 1 Guest(s)