Personally I tend to (re)invent lots of wheels, but I also tend to throw away my invention when I do find a good module. The problem for me is that finding the correct module and making sure it does what I want is often a more daunting task than writing my own, especially at the beginning of the project when I don't even know what I really will need. I'm a fan of the Agile methodology, which usually means that at the beginning I only need something really simple to get the first working version. As I gradually understand the complexity of the problem, and thus the requirements, I can better judge whether a module will do what I need. At that time, I won't hesitate in using a good module.
So I'd say, invent and re-invent as you see fit, but be on a constant lookout for existing modules that actually do what you want. There are lots of smart people out there.