Coolmo
2004-10-25, 07:42 PM
Here's a quick and easy one.....
I've written some pretty powerful programs in VBA but I'm sure they would be considered sloppy to some people because I repeat processes often. Can someone enlighten me on how to have a Private Sub go out to another part of the program to make some calculations and then return the variables back to the same Private Sub and continue working? Do I put the calculation portion of this in a module? Do I have to make all variables Public? Can I have the calculation portion query other objects on the form and return values? Etc.....
Can someone write out some quick code that I can use as example or point me to a link for this info?
Thanks in advance!
I've written some pretty powerful programs in VBA but I'm sure they would be considered sloppy to some people because I repeat processes often. Can someone enlighten me on how to have a Private Sub go out to another part of the program to make some calculations and then return the variables back to the same Private Sub and continue working? Do I put the calculation portion of this in a module? Do I have to make all variables Public? Can I have the calculation portion query other objects on the form and return values? Etc.....
Can someone write out some quick code that I can use as example or point me to a link for this info?
Thanks in advance!