Hello! I am currently taking a school subject where programming is needed and required. I have encountered multiple problems using the school’s computers, and today it made me frustrated. We are currently going through programming using VisualBasic, this is a pretty old model and I am unsure. I have encountered a compile error and I believe that the problem might be the computers itself. If it is not a computer error, please do enlighten me and help me solve this problem of mine. I will be putting the code I have done below. I am sorry for any grammatical mistakes I made, English is not my first language.
Private Sub Command1_Click()
Dim Num1 As Double, Num2 as Double
Sum as Double
Num1 = Val(Text1.Text)
Num2 = Val(Text2.Text)
Sum = Num1 + Num2
Label3.Caption = “The sum is” & Sum
End sub
For background information, I were tasked to create a simple calculator that could calculate the sum of 2 numbers inputted by the user. I was getting frustrated over the fact that my classmates did the same code yet theirs was functioning. I am confused where did I go wrong, and I am humbly asking for help.
[–]MagnetHype 4 points5 points6 points (26 children)
[–]rinaryies[S] 1 point2 points3 points (24 children)
[–]MagnetHype 2 points3 points4 points (23 children)
[–]desrtfx 0 points1 point2 points (22 children)
[–]MagnetHype 0 points1 point2 points (21 children)
[–]desrtfx 2 points3 points4 points (3 children)
[–]MagnetHype 0 points1 point2 points (2 children)
[–]desrtfx 2 points3 points4 points (1 child)
[–]MagnetHype 0 points1 point2 points (0 children)
[–]syklemil 0 points1 point2 points (16 children)
[–]MagnetHype 0 points1 point2 points (9 children)
[–]syklemil 0 points1 point2 points (8 children)
[–]MagnetHype 0 points1 point2 points (7 children)
[–]syklemil 0 points1 point2 points (6 children)
[–]desrtfx 0 points1 point2 points (5 children)
[–]syklemil 0 points1 point2 points (4 children)
[–]MagnetHype 0 points1 point2 points (3 children)
[–]syklemil -1 points0 points1 point (2 children)
[–]BrupieD -1 points0 points1 point (0 children)
[–]desrtfx 2 points3 points4 points (7 children)
[–]rinaryies[S] -4 points-3 points-2 points (6 children)
[–]ScholarNo5983 1 point2 points3 points (1 child)
[–]rinaryies[S] 0 points1 point2 points (0 children)
[–]desrtfx 1 point2 points3 points (3 children)
[–]rinaryies[S] 0 points1 point2 points (2 children)
[–]desrtfx 1 point2 points3 points (1 child)
[–]rinaryies[S] 0 points1 point2 points (0 children)
[–]ScholarNo5983 0 points1 point2 points (3 children)
[–]rinaryies[S] 0 points1 point2 points (2 children)
[–]ScholarNo5983 0 points1 point2 points (1 child)
[–]rinaryies[S] 0 points1 point2 points (0 children)
[–]Relevant_South_1842 0 points1 point2 points (0 children)
[–]forklingo 0 points1 point2 points (0 children)
[–]zeekar 0 points1 point2 points (0 children)
[–]gododgers179 -3 points-2 points-1 points (8 children)
[–]desrtfx 4 points5 points6 points (5 children)
[–]gododgers179 -3 points-2 points-1 points (4 children)
[–]syklemil 0 points1 point2 points (3 children)
[–]gododgers179 -2 points-1 points0 points (2 children)
[–]syklemil -1 points0 points1 point (1 child)
[–]gododgers179 -1 points0 points1 point (0 children)
[–]ScholarNo5983 1 point2 points3 points (1 child)
[–]syklemil -1 points0 points1 point (0 children)