answersLogoWhite

0

make sure that the procedure you are calling is in the SAME form and/or on a different form marked as public or friend. preferably public.
The calling procedure will then need to type in the name of the procedure to be called. Ill give an example.

form1
private sub fun()
'some code here...'
dim sweet as integer = 0
coolBeans(sweet)
end sub

form2
public sub coolBeans(byval variable as integer)
'code to be called here
end sub

This will call coolBeans from fun passing it sweet.
Note 2 things: byval means that the variable will not change in sub fun. if you want it to, pass it with byref.
you do not have to pass anything, but you MUSTcall the next sub: coolBeans()

User Avatar

Wiki User

15y ago

What else can I help you with?