An ordinary module is simply a container for Subs (subroutines) and functions.
Each is a self contained set of code, which can be called from elsewhere in the function. The difference is that a function returns a value, and can therefore be used in an expression, whereas a sub cannot.
For example:
Code:
Public Sub DisplayMessage (strMessage As String)
MsgBox strMessage
End Sub
and
Code:
Public Function MultiplyTwoNums (intNum1 As Integer, intNum2 As Integer) As Integer
MultiplyTwoNums = intNum1 * intNum2
End Function
Create a new module and copy and paste the code sections in there, then save the module. It doesn't matter what you call it, as its the functions and sub names that get used when you call it.
Now, go into a form and in something, for example, the click event of a button, type
Code:
Call DisplayMessage "This comes from DisplayMessage - 1"
Call DisplayMessage "This comes from Displaymessage - 2"
MsgBox "2 * 2 is " & MultiplyTwoNums (2, 2)
MsgBox "3 * 3 is " & MultiplyTwoNums (3, 3)
Switch to form view, then click the button. You should get four messageboxes - with different data.
While the above examples are very simple, they illustrate the fact that you can use them for a lot of different things. Your imagination is the only limitation.
John