DaniBoy
Registered User.
- Local time
- Today, 13:43
- Joined
- Nov 18, 2001
- Messages
- 174
Hello,
Can you tell me if this code is written right? if not whats wrong with it.
#1
Function Addition(ByVal MyVar as Integer)
MtVar = MyVar + 1
Addition = MyVar
End Function
Sub command_OnClick()
Dim MyVar as Integer
Dim result as Integer
MyVar = 99
Result = Addition(MyVar)
MsgBox(result)
MsgBox(MyVar)
End Sub
After the button name “command” is clicked what is displayed?
#2
Consider the following:
Sub ShowValue()
Dim X as Integer
X=3.6
Msgbox(X)
End Sub
What should you get on the msgbox?
Thanks
Can you tell me if this code is written right? if not whats wrong with it.
#1
Function Addition(ByVal MyVar as Integer)
MtVar = MyVar + 1
Addition = MyVar
End Function
Sub command_OnClick()
Dim MyVar as Integer
Dim result as Integer
MyVar = 99
Result = Addition(MyVar)
MsgBox(result)
MsgBox(MyVar)
End Sub
After the button name “command” is clicked what is displayed?
#2
Consider the following:
Sub ShowValue()
Dim X as Integer
X=3.6
Msgbox(X)
End Sub
What should you get on the msgbox?
Thanks