D
Don Wiss
We have a pricing add-in that several of our pricing models use. For most
workbooks the functions simply sit in cells. In one the VBA also calls the
functions. So for that one I set up a Reference. The problem is this
spreadsheet can get large, and when the user opens more than one of them
they often get a Catastrophic Failure. Despite its scary sound, when I've
been checking this out I've found that if I keep ending the errors it seems
to end up working okay. But the users don't like this. Searching on
Catastrophic Error finds things that we aren't doing, like using .NET. Now
I'm not sure that the Reference is the cause of this, but it is the only
thing different between this workbook and others. I haven't found much on
References. With two workbooks open there are then two References. Should I
remove the Reference and call the add-in functions in VBA using
Application.Run? Would this solve our problem?
I tried calling it this way. I've only used Application.Run for macros with
no arguments. Trying with a function got me an error.
The current way, using the Reference:
HL = GetHazardLevel(Range("PremDist").Cells(j, 1).Value, HL)
Trying Run:
HL = Application.Run("'CalcILF Add-In.xla'!GetHazardLevel(Range(""PremDist"").Cells(j, 1).Value, HL)")
I gather I'm getting my quotes all messed up?
Is it more efficient to use a Reference?
Don <www.donwiss.com> (e-mail link at home page bottom).
workbooks the functions simply sit in cells. In one the VBA also calls the
functions. So for that one I set up a Reference. The problem is this
spreadsheet can get large, and when the user opens more than one of them
they often get a Catastrophic Failure. Despite its scary sound, when I've
been checking this out I've found that if I keep ending the errors it seems
to end up working okay. But the users don't like this. Searching on
Catastrophic Error finds things that we aren't doing, like using .NET. Now
I'm not sure that the Reference is the cause of this, but it is the only
thing different between this workbook and others. I haven't found much on
References. With two workbooks open there are then two References. Should I
remove the Reference and call the add-in functions in VBA using
Application.Run? Would this solve our problem?
I tried calling it this way. I've only used Application.Run for macros with
no arguments. Trying with a function got me an error.
The current way, using the Reference:
HL = GetHazardLevel(Range("PremDist").Cells(j, 1).Value, HL)
Trying Run:
HL = Application.Run("'CalcILF Add-In.xla'!GetHazardLevel(Range(""PremDist"").Cells(j, 1).Value, HL)")
I gather I'm getting my quotes all messed up?
Is it more efficient to use a Reference?
Don <www.donwiss.com> (e-mail link at home page bottom).