I used the column tag. I also needed the ‘names’ so I’m doing this:
Dim firstline As Boolean = True
Dim i As Integer = 0
Dim node As JSONItem
For Each name As String In J.Names
node = J.Child(name)
ParamChgLB2.AddRow
ParamChgLB2.RowTag(ParamChgLB2.LastIndex) = name // we'll need this later...
For Each subname As String In node.Names
If firstline Then
ParamChgLB2.Heading(i) = subname
ParamChgLB2.ColumnTag(i) = subname + Chr(9) + Str(node.value(subname).Type) // we'll need this later too!
End If
ParamChgLB2.Cell(ParamChgLB2.LastIndex, i) = node.value(subname)
i = i + 1
Next
firstline = False
i = 0
Next
Then in ListBox.CellAction I have:
Dim rt As String = Me.RowTag(row)
Dim ct() As String = Me.ColumnTag(column).StringValue.Split(Chr(9))
Dim node As JSONItem = JSON.Child(rt)
Dim nodeVal As Variant = node.value(ct(0))
Dim coltype As Integer = Val(ct(1))
System.DebugLog("Editing: " + nodeVal.StringValue + " to " + Me.Cell(row, column))
System.DebugLog("node Type before: " + Str(nodeVal.Type) + ", Col type = " + Str(coltype))
nodeVal = Me.Cell(row, column)
Select Case coltype
Case Variant.TypeInteger
node.value(ct(0)) = nodeVal.IntegerValue
Case Variant.TypeString
node.value(ct(0)) = nodeVal.StringValue
Case Variant.TypeBoolean
node.value(ct(0)) = nodeVal.BooleanValue
End Select
System.DebugLog("node Type after: " + Str(node.value(ct(0)).Type))
Works a treat! Thanks, Gents!!