Program ask me to enter six random numbers and then show the sum.
Here is the code I entered:
Public Sub sum()
Dim a, b, c, d, e, f
MsgBox "Find sum"
Do
r = InputBox("Enter six numbers ", " ")
MsgBox "And the sum is: " & a + b + c + d + e + f
End Sub
But I get this error:
Compile error:
Do without Loop
What do I need to correct??
Here is the code I entered:
Public Sub sum()
Dim a, b, c, d, e, f
MsgBox "Find sum"
Do
r = InputBox("Enter six numbers ", " ")
MsgBox "And the sum is: " & a + b + c + d + e + f
End Sub
But I get this error:
Compile error:
Do without Loop
What do I need to correct??