tags:

views:

31

answers:

1

Hello, I am building a data validation system (to check entries in cells) that is referring to a dynamically built named range. Sometimes the range does not exist and I have the "Error in loading DLL message".. is there a way to disable it? Thanks.

A: 

If you don't have to know wether the error was triggered then try this:

On Error Resume Next
<code accessing the named range>
On Error Goto 0

If you need a way to check wether the error would have been raised:

Dim flag as Boolean
flag = False

On Error Resume Next
<code accessing the named range>
flag = True
On Error Goto 0

Flag will only become True if the critical code has been executed successfully

I know its dirty but so is VBA ;o)

das_weezul
Thanks for your quick reply. I am actually building it using spreadsheet functions only and was wondering whether there was a way to globally turn this alert off. Thanks.
excelsior