Adding custom propertys to cut-list-items

Hi,

I use this code to add custom propertys to a cut listitem. Itworks fine for 1 item, but for more items i want to add acounterto this code so the others items will be filledinautomatically.

Dim swApp As ObjectDim Part As ObjectDim SelMgr AsObjectDimboolstatus As BooleanDim longstatus As Long, longwarningsAsLongDim Feature As ObjectSub main()Set swApp=Application.SldWorksSet Part = swApp.ActiveDocSet SelMgr=Part.SelectionManagerswApp.ActiveDoc.ActiveView.FrameState=1boolstatus=Part.Extension.SelectByID2("Cut-List-Item1","SUBWELDFOLDER", 0, 0,0, False, 0, Nothing, 0)SetFeature =Part.SelectionManager.GetSelectedObject2(1)boolstatus=Feature.CustomPropertyManager.Add("DESCRIPTION","Text", "")boolstatus =Feature.CustomPropertyManager.Add("ARTIKELNR","Text"," ")boolstatus =Feature.CustomPropertyManager.Add("LENGTH","Text"," ")boolstatus =Feature.CustomPropertyManager.Add("WIDTH","Text", "")boolstatus =Feature.CustomPropertyManager.Add("REMARKS","Text", "")boolstatus =Feature.CustomPropertyManager.Add("MATERIAL","Text"," ")

Is there a way to import the number of items in vb so that icanlet my counter stop at this number. Otherwise it runs anendlessloop.SolidworksApi macros