10-21-2012, 09:24 AM
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?
Thanks,
[/b]
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]