Hi ppl!
I am trying to develop an excel workbook that should have a listbox that have to be populated from a xml file.
I have searched millions of sites, foruns, and can't get no example that works.
Can anyone help me?
Thanks anyway.
Hi ppl!
I am trying to develop an excel workbook that should have a listbox that have to be populated from a xml file.
I have searched millions of sites, foruns, and can't get no example that works.
Can anyone help me?
Thanks anyway.
i have not done anything with xml files, but a here are a few sites that might help
http://www.ozgrid.com/forum/showthread.php?t=27818
http://en.allexperts.com/q/XML-1469/...iles-Excel.htm
from the little bit that i read it looks like it might be easyest to bring the data into excel then load it into the listbox. it would help if i knew what the xml file you were using looked like. also is the list box an object on the sheet or are you using data validation to turn a cell into a listbox?
How about just reading it in VBA, it s just a text file, and pase the data and load the listbox from there.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Hi vba ppl!
I have found something that are working:
[vba]
Sub ler_xml()
Dim xmldoc As MSXML2.DOMDocument
Set xmldoc = New MSXML2.DOMDocument
Dim root As IXMLDOMElement
Dim oNodeList As IXMLDOMNodeList
Dim item As IXMLDOMNode
Dim subitem As IXMLDOMNode
Dim myarray As Variant
xmldoc.async = False
xmldoc.Load ("c:\T-Pedidos\Obras.xml")
Set root = xmldoc.documentElement
Set oNodeList = root.childNodes
For Each item In oNodeList
UserForm2.ListBox1.AddItem (item.childNodes.item(1).Text & " | " & item.childNodes.item(2).Text & " | " & item.childNodes.item(3).Text)
Next
End Sub
[/vba]
Right now i am searching for a way to perform a search/filter in a userform/listbox.
If somebody knows how please tell me.
Good Codes For Everybody!
If you design your listbox to be more of a 'results' box, you can use xPath for searches and filters. .02 StanOriginally Posted by cavacuz
Hi stan!Originally Posted by stanl
What i am trying to do is perform a search/filter in a listbox populated from a xml.