# How to: Call a Procedure that Does Not Return a Value (Visual Basic)

A Sub procedure does not return a value to the calling code. You call it explicitly with a stand-alone calling statement. You cannot call it by simply using its name within an expression.

### To call a Sub procedure

1. Specify the name of the Sub procedure.

2. Follow the procedure name with parentheses to enclose the argument list. If there are no arguments, you can optionally omit the parentheses. However, using the parentheses makes your code easier to read.

3. Place the arguments in the argument list within the parentheses, separated by commas. Be sure you supply the arguments in the same order that the Sub procedure defines the corresponding parameters.

The following example calls the Visual Basic AppActivate function to activate an application window. AppActivate takes the window title as its sole argument. It does not return a value to the calling code. If a Notepad process is not running, the example throws an ArgumentException. The Shell procedure assumes the applications are in the paths specified.

Dim notepadID As Integer
' Activate a running Notepad process.