Re: how to generalize a command in Module to be called in different forms
You would pass the object or form as a parameter
In your module
Public Sub ClearPicture(PictureBox as Picture)
In your form code you would use
Public Sub ClearPicture(TheForm as Form)
Of course neither of these would make any sense in the example you gave as you could simply use
in your form code rather than calling a separate sub for such a simple method.
In general however you should never make a specific reference to a form from a module or other form and instead you should pass the form or control to be used as a parameter so that the module can work with any form rather than being locked into a form by a specific name.
Always use [code][/code] tags when posting code.