The code below seems to produce an error saying that the object variable is not set or with block variable not set! Error code '91' I believe.
Code:
Sub Read_XML(sPath As String)
Dim cXml As New ChilkatXml
Dim i As Integer
Dim itm As ListItem
cXml.LoadXml sPath
For i = 0 To cXml.NumChildren
Dim xxNode As ChilkatXml
Set xxNode = cXml.GetChild(i)
Set itm = frmLibrary.lstLib.ListItems.add(, xxNode.GetAttributeValue(i), xxNode.GetChildWithTag("Title").Content)
itm.SubItems(1) = xxNode.GetChildWithTag("Artist").Content
itm.SubItems(2) = xxNode.GetChildWithTag("Album").Content
itm.SubItems(3) = xxNode.GetChildWithTag("Genre").Content
itm.SubItems(4) = xxNode.GetChildWithTag("Length").Content
Next i
End Sub
Any reasons why?
------------------------------------------------
Apocolypse2005
Always ready and waiting to be helped!