Private subroutines and functions do not require scope prefixes. Here are some examples of private subroutines:
Private Sub OpenLogFile() Private Sub ClearGrid()
And here are some private functions:
Private Function nGetNextItem() As Integer Private Function sGetFullPath(ByVal sFileName As String) _ As String Private Function CGetNextCell() As CTableEntry
The rules for choosing scope prefixes for public subroutines are exactly the same as those for variables, as shown here:
Public ErReportError() Public TbInsertTableEntry() Public DbDeleteItem()
Form and class methods
Public functions and subroutines defined in classes and forms are properties and do not have type or scope prefixes.
Form and class properties (protected)
Property Let, Property Set, and Property Get routines do not have type or scope prefixes.
When declaring Windows API functions, we use the Alias keyword to add the prefix Win. For example, CallWindowProc becomes WinCallWindowProc. When declaring functions in other DLLs, we use the prefix Dll.
Formal parameters are named as local variables but with i or o added in place of a scope prefix to denote whether the parameter is an input or an output:
Sub CrackURL(ByVal siURL As String, ByRef soProtcol, _ ByRef soPath, ByRef soPath, ByRef noPort)
For parameters that are both inputs and outputs, we use io.