When it comes to using pre-made libraries, there are two factors to consider, (1) does a pre-made library routine exist which performs the function I want and (2) how long will it take me to find it? I generally find that writing a routine myself has two benefits: (a) it does exactly what I want and (b) I learn more about programming with a wider variety of routines to write.
If a routine is simple, it's usually quicker to rewrite it than to hunt for an existing equivalent.
If the routine is complex, it will always be more difficult to understand someone else's code than your own (or code written to your own company's standard) so when it comes to maintaining a pre-made library routine as the needs of the application change, it may be more time consuming to edit a pre-made library routine than to edit one with which you are familiar because you wrote it.
Another factor is speed. The code I write is speed-critical and often general purpose routines are not optimised for speed. e.g. in an If ... then ... else ... endif situation, do you use the VB Iif() function or multi-line code. I've done speed tests and found that multi-line code is faster than Iif(). It's easier to optimise my own code for speed than someone else's.
Keep Up with TechRepublic