What I'm doing is like this:
SetCurrentLine - LineNumSpecifies the row number. The count starts from 0.
.Lines.SetCurrentLine(LineNumber of the Child BOM)
If oCostingCode <> "" Then
.Lines.CostingCode = oCostingCode
End If
If oCostingCode2 <> "" Then
.Lines.CostingCode2 = oCostingCode2
End If
.Lines.CostingCode3 = txt_Unit.Value
Regards,