By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Library of Code

daniel aristidou
100+
P: 491
Hi guys this will probably seem like a very stupid.............question but i would like to store certain tasks for use in many programs e.g if printing is carried out using the same step more or less. I heard something about modules......Can anyone explain what a module is exactly and how i can use this to make a library of common scripts.
Thanks Daniel(~_~)
Jan 22 '08 #1
Share this Question
Share on Google+
9 Replies


Expert 5K+
P: 8,434
I believe the answer to this will be heavily dependent on what version of VB you're using.
Jan 23 '08 #2

daniel aristidou
100+
P: 491
Hey killer42 im using vb08....
Jan 23 '08 #3

daniel aristidou
100+
P: 491
Hey killer42 im using vb08....
Does anyone out there deal with vbo8>>>>:((
Jan 25 '08 #4

daniel aristidou
100+
P: 491
Hello hello hello is there anybody outhere? :-{
Jan 28 '08 #5

Expert 5K+
P: 8,434
It does seem to have fallen silent around here, huh.

Unfortunately I can't help with this one, for a number of reasons including...
  • I work with VB6, and the way they handle this kind of thing is quite different
  • I'm very disorganised - have always intended to set up some code library/libraries along these lines, but haven't actually done it.
Jan 29 '08 #6

daniel aristidou
100+
P: 491
OK....Can anyone help me do this in vb6 or 2k5....???????
Jan 30 '08 #7

Expert 5K+
P: 8,434
OK....Can anyone help me do this in vb6 or 2k5....???????
In VB6, I suppose you can just create a module in which you put all your Public Subs and Functions, then add that module to each project you create.

That's the simple method. Beyond that... well, like I said, I'm not that organised. I hope someone else has some ideas.
Jan 30 '08 #8

daniel aristidou
100+
P: 491
In VB6, I suppose you can just create a module in which you put all your Public Subs and Functions, then add that module to each project you create.
So this basicly.... i need to standarize the name i give my controls....then a module will work in any of my projects.....also
I don't need to call the module? The code under a sub will automatically run if the event occurs eg...a sub in the module for a control on click will automatically be run when i click on the comtrol in a form?
Jan 30 '08 #9

Expert 5K+
P: 8,434
So this basicly.... i need to standarize the name i give my controls....then a module will work in any of my projects.....also
I don't need to call the module? The code under a sub will automatically run if the event occurs eg...a sub in the module for a control on click will automatically be run when i click on the comtrol in a form?
No. Unless later versions of VB have made some pretty radical changes, the code for an event procedure would have to reside within the form.

However, you could simply place a line of code there to pass control to your standard routine. I don't think standardising the names of your controls will help. But don't forget, you can pass the control to the common routine as a parameter.
Jan 30 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.