Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Range.Value2, Range.Text and UDFs
Hi, I'm creating an Excel application level solution (using AddIn and UDF classes). I have 2 UDFs: Cache() and AnotherFunction(). The Cache() function inits/creates a cache on a remote server, which returns an ID that can be referenced by AnotherFunction(). The AddIn is set to find all Cache() functions and run them when a workbook is loaded (ensure that the caches are initialized on the server). Of course, any AnotherFunctions() functions that references the Cache() function will also update (when the Application.Calculation is set to Auto). But here's the scenario that's baffling me: AddIn: Finds a Cache() function, inserts it. I then do a quick test to check the values of the range (Range.Value2, Range.Text, Range.Formula), all which are correctly populated. UDF: Since an AnotherFunction() function refers to the Cache() function, the AnotherFunction's UDF is executed once the Cache() function returns. However, when I try to retrieve the Range.Value2 from the parameter, I get null. Only Range.Text and Range.Formula is populated. Am I missing a step? Why is Value2 null in the UDF, but correctly populated in the AddIn? Please help. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Bind VBA Variable to Range().Value2 Property | Excel Programming | |||
Exception from HRESULT: 0x800A03EC when setting string in Range.Value2 field | Excel Programming | |||
Excel & C# NullReference Error when trying to set Range.Value2 | Excel Programming | |||
Range.Value2 is failing for lenghty strings | Excel Programming | |||
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range | Excel Programming |