So many terms, and only one solution. Forgive me if I lead you on the wrong path, but remember this one bit of advice. You're not responsible for what other people think, and are unable to control the thoughts of others. But your question reminds me of the joke "What's the difference between the Negro, Colored, Black Man, or African-American?
In computer land, we have a similiar joke, What's the difference between a module, function, procedure, subprogram, or method?
If you know what you're doing when you write code, you'll do just fine! In my opnion, for Visual Basic users, an module is the same as a subprogram. If anyone tells you different, tell them to place a Visual Basic module side by side with a Visual Basic subprogram and explain the difference.
In a module, you will keep variables and functions, subs, etc. that you will share between 2 or more forms. It will produce smaller exe. as code is not repeated. Code that is specific to only one form, should be kept in that form. And as far as calling a function that is in a module, your program will look first in it own form, then look in any modules you have so no extra coding is used. Your program can also have more than one module, so you can organize things as you see fit.
A module is essentially used for reusability of the code. also you can use a class module to implement object oriented programming.
you can add a module(standard/class) by right clicking on the project->add in the project explorer or by clicking on the arrow adjacent to ADD FORM button on toolbar and selecting the required module.
it is a good idea to keep related functions in a single module so that when you need these functions again in another project you just include the same module. for example you could have a module named fileops which has all the file operations (create,delete,move copy,open etc.) with the appropriate error handling which you could then use in all your projects which deal with files.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.