Got to agree with these guys but .....
If all you want is a simple little global function which doesn't need to manipulate any views then if you just create a new code module.
Project > Add New Module > Code Module
Let's call it testModule
then make a new Sub in that like this for example:
Sub testSub(i As Int)
ToastMessageShow("You gave me this number " & i & " what should I do with it?", True)
End Sub
Then you can call it from any other module and not only that but when you write out the first part which is testModule. after you hit the dot you get intellisense!
So from my main module I could do:
testModule.testSub(25)
I think Objects is definitely the better way to go but just thought I'd mention this
If you want to get fancy do this in testModule:
Sub testSub(i As Int) As String 'ooh, now it returns a string!
ToastMessageShow("You gave me this number " & i & " what should I do with it?", True)
Return("Ok, did that!")
End Sub
and this in main:
ToastMessageShow(testModule.testSub(25), True)