Tracker Training Script Key 1

Sub OnMouseUp(x As Long, y As Long, flags As Long)

Dim itemid As String

Dim model as String

Dim item As New prtItem

For i = 1 To 10

'Prompt user for the Carrier item id and model

'itemid = InputBox$("Enter CARRIER item id, please","Item ID Entry","")

'model = "00"

'Random generate item id

Randomize

Number = Random(1,5000)

itemid = "C" & Number

model = "00"

'Set the item properties

item.regionid="LOAD_CONV"

item.itemid = itemid

item.itemtypeid = model

item.regionloc = -1

item.exthold 0

item.groupid = "MAIN"

item.inthold 0

'Add the item to PRT

item.Add

Next i

Dim Region As New PrtRegion

'Add Attributes for Carriers

Region.Id = "LOAD_CONV"

A1$ = "CYCLE COUNT"

A2$ = "LAST CYCLE"

A3$ = "LAST CLEAN DATE"

A4$ = "ON-LINE DATE"

A5$ = "SUPPLIER"

value$ = " "

Region.GetItemList

j=0

for j = 0 to Region.ItemCount - 1

Region.Item(j).SetAttr A1$, value$

Region.Item(j).SetAttr A2$, value$

Region.Item(j).SetAttr A3$, value$

Region.Item(j).SetAttr A4$, value$

Region.Item(j).SetAttr A5$, value$

Region.Item(j).Modify

Next j

End Sub

More information