Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click 'DELETE

 

 

    Dim IndividualCoin As XmlNode

 

 

    IndividualCoin = doc.SelectSingleNode("descendant::singlecoinentry[description='" & lstDescriptions.SelectedItem & "']")

 

    IndividualCoin.ParentNode.RemoveChild(IndividualCoin)

 

    doc.Save(coinsFilePath)

 

    Dim n As Integer = lstDescriptions.SelectedIndex

    lstDescriptions.Items.RemoveAt(n)

 

    If n = lstDescriptions.Items.Count Then n = n - 1

 

    lstDescriptions.SelectedIndex = n

    Call lstDescriptions_Click(Me, e)

 

End Sub