how to make index counter for listbox, starting 0 1 2... and so on, let say for layers dim LayerName as Acadlayer dim Index as Integer for each LayerName in thisdrawing.layers ListBox1.Additem LayerName.Name index = index + 1 ;this is right way ....... ....... next end sub