KishorKK Member Oct 31, 2016 #1 Hi All, Can someone help me with this, Sub test() InputBox ("Enter your name") x = InputBox("Enter first number") y = InputBox("Enter second number") MsgBox (x) MsgBox (y) MsgBox (x + y) End Sub i'm getting this error!! POST MOVED BY MODERATOR. . Last edited by a moderator: Oct 31, 2016
Hi All, Can someone help me with this, Sub test() InputBox ("Enter your name") x = InputBox("Enter first number") y = InputBox("Enter second number") MsgBox (x) MsgBox (y) MsgBox (x + y) End Sub i'm getting this error!! POST MOVED BY MODERATOR. .
Ramesh Active Member Oct 31, 2016 #2 On the top of your code module..do you have Code: OPTION EXPLICIT written?? If yes, then you have to declare all your varaibles before you start using them in your code.. The solution would be, either remove Code: OPTION EXPLICIT on the top of your code module or declare the variables using Code: dim x as integer dim y as integer Hope this helps!!
On the top of your code module..do you have Code: OPTION EXPLICIT written?? If yes, then you have to declare all your varaibles before you start using them in your code.. The solution would be, either remove Code: OPTION EXPLICIT on the top of your code module or declare the variables using Code: dim x as integer dim y as integer Hope this helps!!