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.
ThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(Combobox1.Text)
-. alfred -
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register