Thanks for your answer, but I'm not sure I understand it. Can you please apply it on my specific problem:
I have forms frm1, frm2 ... frm20. They are opened one at a time.
All of them have 4 text boxes: txt1, txt2, txt3 and txt4.
All of the forms have a procedure proc() which does the following:
txt1.Text = "a"
txt2.Text = "b"
txt3.Text = "c"
txt4.Text = "d"
Now I want to avoid having that procedure in each one of the 20 forms. I want to have it only once and it would probably be in a
So, I need an opened form to be able to call that procedure in that
module and get it's text boxes filled with "a", "b", "c" and "d".
In VBA you would simply put procedure
CodeContextObject.txt1 = "a"
CodeContextObject.txt2 = "b"
CodeContextObject.txt3 = "c"
CodeContextObject.txt4 = "d"
in a separate module and call it from any of the forms:
and the text boxes would get their values.
So, how to do it in VB
Thanks in advance.