|
データが必ず親より下の行に子が有ると言う関係では無く
ランダムに並んでいるなら、以下のプロシージャの中を★印の様に変更して下さい
Private Sub DataDeleteF(vntKey As Variant, _
vntList As Variant, _
lngRow As Long, _
vntFlags() As Variant)
Do Until vntList(0)(lngRow, 1) = ""
If vntKey = vntList(0)(lngRow, 1) Then
vntFlags(lngRow, 1) = "削除"
' DataDeleteF vntList(1)(lngRow, 1), vntList, lngRow + 1, vntFlags()
DataDeleteF vntList(1)(lngRow, 1), vntList, 1, vntFlags() '★変更
End If
lngRow = lngRow + 1
Loop
End Sub
Private Sub DataDelete(vntKey As Variant, _
vntList As Variant, _
lngRow As Long, _
lngFlags() As Long, _
lngCount As Long)
Do Until vntList(0)(lngRow, 1) = ""
If vntKey = vntList(0)(lngRow, 1) Then
lngFlags(lngRow, 1) = 1
lngCount = lngCount + 1
' DataDelete vntList(1)(lngRow, 1), vntList, lngRow + 1, lngFlags(), lngCount
DataDelete vntList(1)(lngRow, 1), vntList, 1, lngFlags(), lngCount '★変更
End If
lngRow = lngRow + 1
Loop
End Sub
|
|