Private Sub UserForm_Initialize() Dim layerColl As AcadLayers Dim entry As AcadLayer Dim LayList As String Set layerColl = ThisDrawing.Layers For Each entry In layerColl ComboBox1.AddItem entry.Name Next End Sub
I have a form with a combobox. That combobox is filled up with all layers in a drawing. (see above)
Now I want to make the layer that I have selected (value) in the combobox the current layer in my drawing.
How can i make it current?
thanks gr. László
Solved! Go to Solution.
Solved! by lanieuwe. See the answer in context.
Thank you Alfred!
It was the item...
I wish you a nice christmas!
ThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(Combobox1.Text)
-. alfred -
Access a broad range of knowledge to help get the most out of your products and services.