1. Create a class (called ServerClass or something like that) to store the data from the XML.
Code:
Option Explicit
Public ServerLocation As String
Public ServerInfo1 As String
Public ServerInfo2 As String
2. Populate the collection as you read from your XML string and Add it to a Collection.
Code:
Dim clsServerClass As ServerClass
Dim colServerCollection As Collection
Set colServerCollection = New Collection
Do Until (End of XML File)
Set clsServerClass = New ServerClass
clsServerClass.ServerLocation = (XML Location)
clsServerClass.ServerInfo1 = (XML Info1)
clsServerClass.ServerInfo2 = (XML Info1)
colServerCollection.Add clsServerClass, clsServerClass.ServerLocation 'Set ServerLocation to the Collection Key only if it's unique
Loop
3. When you choose from the combobox, fetch the correct Class info from the collection and use it to populate your textboxes:
Code:
Dim clsServerClass As ServerClass
Set clsServerClass = colServerCollection(Combobox.Text) 'Assuming that you populate the combobox with the ServerLocation
txtLocation.Text = clsServerClass.ServerLocation
txtInfo1.Text = clsServerClass.ServerInfo1
txtInfo2.Text = clsServerClass.ServerInfo2