Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.office.xml,microsoft.public.xml
external usenet poster
 
Posts: 2
Default Function using XMLDataQuery in Excel: Not refreshing automatically on worksheet

Greetings,

I hope someone can help me with this! This is my first attempt working
with XML, so please bear with me.

I have a simple user-defined function called "GetNode" (see below).
I want to be able to pass in the name of a node from my schema (map),
and have it return the value of that node. The function itself works as
it should, so when I enter in the equation in the worksheet as
=GetNode("LoanAmount"), it returns the correct value of the loan
amount for the cell that is mapped to the element LoanAmount.

Public Function GetNode(strNodeName As String) As String

Dim strFullNode As String

strFullNode = "/ns1:Loan/ns1:" & strNodeName
GetNode = ActiveWorkbook.Worksheets("Loan
Data").XmlDataQuery(strFullNode).Value

End Function


However, if I change the value of the LoanAmount cell in the worksheet,
the cell that has the equation calling the GetNode function does not
update automatically. In order to get it to display the updated value,
I have to double-click in the cell to activate it, and then it
re-calculates. (Calculation is clearly set to automatic, not manual)

Can anyone please explain to me why the equation would not update
automatically as I expect that it should? Or any other alternatives or
ideas? Thank you very much in advance!

Reply
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
Refreshing formulas automatically Gingerly Excel Discussion (Misc queries) 3 September 30th 09 08:28 PM
Links Automatically refreshing in Excel 2007 Bronwyn Excel Worksheet Functions 3 December 8th 08 04:39 AM
Refreshing Excel worksheet with data linked from Access mcphc Excel Discussion (Misc queries) 1 March 23rd 07 05:16 PM
XmlMapQuery and XmlDataQuery Samples in Excel 2003 and VB.NET Jalal[_2_] Excel Programming 0 April 8th 05 08:03 PM
Worksheet Function not refreshing Mark Excel Programming 1 January 14th 05 11:02 AM


All times are GMT +1. The time now is 07:53 PM.

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"