Problems with vba

Hello I try to send object property as argument to a function in vba this function must sort objects by "LAYER" or "COLOR"
but i don't know how to use this argument in the function
Public Function tri_par ( Aray , value) For i = 1 To UBound (aray) .............. .......... objprop = objent.value (where value is equal to "LAYER" or "COLOR") doesn't seems to be right
if it isn't possible, Is there a command that accept dxf code as argument ? That irritates me, if I succeeded not, I go back in Lisp
Thank you to help me.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Can this example help?
Sub MakeRed() Set R = ThisDrawing.Layers.Add("Red layer") R.Color = acRed Dim element as AcadEntity For Each element in ThisDrawing.ModelSpace If element.Color = acRed Then element.Color = acByLayer element.Layer = "Red Layer" end if Next Element End Sub
kr Ben

?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.