太复杂了,错误又多,给你一个: - Private Sub CommandButton1_Click()
- Dim strLayer() As String
- Dim i As Integer
- ReDim strLayer(ThisDrawing.Layers.Count - 1) As String
- For i = 0 To ThisDrawing.Layers.Count - 1
- strLayer(i) = ThisDrawing.Layers(i).Name
- MsgBox strLayer(i)
- Next i
- End Sub
|