Subroutines

Subroutines and functions are not same, generic name for both is procedures.

Subroutines operates internally but does not return a value.

Below is an example of code in which two subroutines are created one has data and other show this in dialog box.


Option Compare Database

Sub DbaseName()

Dim sName As String


sName = "Order Tracking"

ShowDbaseName (sName)

End Sub


Sub ShowDbaseName(sDbaseName As String)

MsgBox (sDbaseName)


End Sub

Previous
Next