Hi all, I have a problem vhen trying to set a new layer color from VBA/Excel.
If I use the following code:
I got a "Problem in loading Application" error when I try to create the aCol object.Code:Set acLayer = acadDoc.Layers.Add(sTag) Dim aCol As Object 'I have also tried with AcadAcCmColor Set aCol = acadApp.GetInterfaceObject("AutoCAD.AcCmColor") 'I have also tried with New AcadAcCmColor aCol.ColorMethod = acColorMethodByRGB aCol.ColorIndex = color acLayer.TrueColor = aCol
If I use Early Binding, the error is "Cannot find the specified module".
Autocad (2016) loads fine and it's the only version installed.
acadDoc is the AcadApplication object, sTag is the name of the new layer.
How can i solve this?
Thank you for the attention!