LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Bind VBA Variable to Range().Value2 Property MachAngle Excel Programming 3 April 18th 09 02:26 AM
Exception from HRESULT: 0x800A03EC when setting string in Range.Value2 field [email protected] Excel Programming 1 March 15th 07 03:27 PM
Excel & C# NullReference Error when trying to set Range.Value2 Chuck Excel Programming 1 August 2nd 06 11:01 PM
Range.Value2 is failing for lenghty strings Naresh Mirkhelkar Excel Programming 4 June 9th 06 02:54 PM
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range Cornell1992 Excel Programming 0 March 14th 06 07:19 PM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"