We Just Finished Writing Our Computer Exam For Class IX...
I just Wanted To Ask If This VB Code Is Fine.
(Program to calculate area of a rectangle)
------------------------------------------
Dim L, B, A As Single
-----------------------------------------------
Private Sub Command1_click()
L = InputBox("enter Length") 'for length
B = InputBox("Enter Height/Breadth") 'Enter Breadth
A = Val(L.text) * Val(B.text) 'Calculating Area
Print Val(A)
End Sub
------------------------------------------
The Problem Is They Said That The .text part in val is not correct....
the teacher said that when you use L.text or b.text you need to use variables...and he said that the code is wrong....is this so?..
I just Wanted To Ask If This VB Code Is Fine.
(Program to calculate area of a rectangle)
------------------------------------------
Dim L, B, A As Single
-----------------------------------------------
Private Sub Command1_click()
L = InputBox("enter Length") 'for length
B = InputBox("Enter Height/Breadth") 'Enter Breadth
A = Val(L.text) * Val(B.text) 'Calculating Area
Print Val(A)
End Sub
------------------------------------------
The Problem Is They Said That The .text part in val is not correct....
the teacher said that when you use L.text or b.text you need to use variables...and he said that the code is wrong....is this so?..