Calling a Module

pjfatboy
03-07-2004, 03:25 PM
I've not done this before so I would appreciate some help. In my project the code on one of my forms is getting quite long. Two of the Sub's are just calulations, so I was thinking about sticking that code in a module. Could someone show me how to refer to that module when I need to do that calculation. Would it be like this?

If Text1 > 10 Then
Call Module1

shapeshifter
03-07-2004, 03:31 PM
you can make a sub public in a module and then call it from a form like this:

'this is in a module
Public Sub Calc()
i=5+2
end sub
'then you can call it from your form like any sub
call Calc
'or just
Calc

pjfatboy
03-07-2004, 03:43 PM
Thanks shapeshifter.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum