Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.office.xml,microsoft.public.xml
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refreshing formulas automatically | Excel Discussion (Misc queries) | |||
Links Automatically refreshing in Excel 2007 | Excel Worksheet Functions | |||
Refreshing Excel worksheet with data linked from Access | Excel Discussion (Misc queries) | |||
XmlMapQuery and XmlDataQuery Samples in Excel 2003 and VB.NET | Excel Programming | |||
Worksheet Function not refreshing | Excel Programming |