hi i'm having a bit of trouble with object dbx and dll's, i've recently compiled all my common code into a dll file, some of the functions include references to objectdbx... but for some reason when i try and use the dll in my routines a type mismatch error appears whenever i use a function that uses the objectdbx object... at the moment i'm declairing the a variable for the objectdbx to be an 'object' is this the correct type for objectdbx??? can you use an objectdbx object in a dll file??? an example of one of the functions that i've compiled to dll is as follows: 'code Public Function LayerExists(oTargetDrawing As Object, sLayerName As String) As Boolean Dim eLayer As AcadLayer For Each eLayer In oTargetDrawing.Layers If UCase(eLayer.Name) = UCase(sLayerName) Then LayerExists = True Set eLayer = Nothing Exit Function End If Next eLayer LayerExists = False Set eLayer = Nothing End Function 'code end the oTargetDrawing is usually either 'thisdrawing' or the objectdbx object any help would be great cheers mark