Any tips on why, when I create an executable, I get a runtime error 5 when I try to run it?

It runs in the IDE fine.

I guess it's a matter of slowly disabling procedures one by one to work out where the error is occuring but it's painful generating an exe, running it, regenerating the exe, running it......