Hi Jim,
What you need to do is create a
Code module (Project>Add new module>code module), I will presume you called it General in the rest of this message.
Now you can put all the subs that you want to call from your activities in General.
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
' a sub named test '
sub test
dim x,y,z
z=x*y 'x and y are called from text boxes
end sub
'another sub named test2
sub test2
dim t
t = z
end sub
Now you can call test from an activity with General.test, and test2 by General.test2
calling them within the code module is just by their name (so to call test from test2, just use test:
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
sub calcnumber (value As EditText)' you can pass objects like this so that you can manipulate the contents
v=value.Text
t=test2 (v)' call test2 to multiply by 4
value.Text=t
end sub
sub test2 (value As Int)' just does *4
result=value*4
return result
end sub
You would call this from an activity with
General.calcnumber (someeditbox)
and the contents of someeditbox would get multiplied by 4 (assuming it was a valid number). I realise that the example is pointless, but it is just to illustrate how to use code modules, hope that helps a bit.
Just read your mail, you can send me the code with questions if you wish, but ultimately you get a better spread of answers (along with some REAL experts) by posting on here.