Hi Guys,
I’m hoping someone can help me with this.
I’m trying to find a xml node,
I can find the node, however, I need to look for the node from what’s entered in a userform textbox.
Here is the code I’m using:
If I change test1 to an actual employee I’d, it works.
Is there anyway to get this to work with the userform box please? Have I missed something?
I’m hoping someone can help me with this.
I’m trying to find a xml node,
I can find the node, however, I need to look for the node from what’s entered in a userform textbox.
Here is the code I’m using:
Code:
Private sub commandbutton1_click()
Dim xmlObj As Object
Dim singlenode As Object
Dim test1 As String
Set xmlObj = CreateObject(“msxlm2.domdocument”)
XmlObj.async = False
XmlObj.valdateOnParse = False
XmlObj.Load (“c:/myfolder/test.xml”)
Test1 = me.txtbox1.value
Set singlenode = XmlObj.SelectSingleNode(“//ContactInfo[EmpID=Test1”]
Debug.print singlenode.xml
End sub
If I change test1 to an actual employee I’d, it works.
Is there anyway to get this to work with the userform box please? Have I missed something?