Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

'(' Expected Error

$
0
0
I'm just supposed to write something small where a Sub-procedure calls another sub-procedure and opens a message box within itself.
Open sub-procedure, message box ("subprocedure 1"), opens next subprocedure, etc.

This is the code I came up with:

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call Sub first()
End Sub
Sub first()
MsgBox("First")
Call Sub second()
End Sub
Sub second()
MsgBox("Second")
Call Sub third()
End Sub
Sub third()
MsgBox("Third")
End Sub
End Class

--
It's telling me " '(' expected " for the first(), second() and third() parts and I'm not sure why.
I'm new to VB. Help?

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>