Trapping Broken Reference

N

NZ VBA Developer

Is there any way to trap the error for a broken/missing reference in a project?
 
S

Shauna Kelly

Hi

Yes, you can do that, but only if the user has trusted access to the VBA
project - and no sensible IT admin would allow that.

So the short answer is no.

The solution is to use late binding, and check whether your object has been
properly established. I generally sequester code that requires this into
small functions, and make the change to late binding near the end of the
coding process so I can have the advantages of early binding while I'm
working.

There's more info on this at
Early vs. Late Binding
http://www.word.mvps.org/FAQs/InterDev/EarlyvsLateBinding.htm

but it's only available for Wallabies supporters<g>.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
N

NZ VBA Developer

Hmm... Very interesting but probably won't help in my case. Looks like I'll
have to rely on 'administrative' controls - a properly designed installation
package for rolling out the project to the users. Just hope the client's IT
manager isn't a Wallabies fan - or worse: an England supporter! <g>

Thanks Shauna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top