Add Parts List

 

I'm trying to add a parts list to a Draft File.  Does anyone know the code for this?  I'm using VB.NET.

 

Posted by: Danny Bansch
Post date: 6/10/2008 6:48:54 AM

1 REPLY

RE: Add Parts List

In VB6, I use:

 

If NewDraft.ActiveSheet.Background.Name = "Size - I" Then

Set BOM = NewDraft.PartsLists.Add(z, "Size I", 0, 1)

ElseIf NewDraft.ActiveSheet.Background.Name = "Size - II" Then

Set BOM = NewDraft.PartsLists.Add(z, "Size II", 0, 1)

ElseIf NewDraft.ActiveSheet.Background.Name = "Size - III" Then

Set BOM = NewDraft.PartsLists.Add(z, "Size III", 0, 1)

ElseIf NewDraft.ActiveSheet.Background.Name = "Size - O" Then

Set BOM = NewDraft.PartsLists.Add(z, "Size O", 0, 1)

ElseIf NewDraft.ActiveSheet.Background.Name = "Size - S" Then

Set BOM = NewDraft.PartsLists.Add(z, "Size S", 0, 1)

End If

 

The "If" block is based upon the Sheet size (custom named) which then places the pre-defined Parts List into the Active Sheet.

 

Posted by: Bill Ledbetter
Post date: 6/10/2008 7:32:01 AM