Private Sub Command1_Click()
Dim a, b As Integer
a = 10
b = 20
sum1(a,b)
End Sub

Private Sub sum1(a, b)
Dim c As Integer
c = a + b
Print c
End Sub

i have called the procedure bu simply the procedure name & arguments within the parentheses as in VB.net, but there is error in the above program.
Plz help me out.

use like this :-

Private Sub Command1_Click()
Dim a, b As Integer
a = 10
b = 20
[B]Call sum1(a,b)[/B]
End Sub

regards
Shouvik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.