📄 vba03-3.txt
字号:
Sub MyMacro()
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim lCount As Long
Dim lIndex As Long
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
lCount = 1
For lIndex = 0 To (pMap.LayerCount - 1)
If TypeOf pMap.Layer(lIndex) Is _
IFeatureLayer Then
lCount = lCount + 1
End If
Next lIndex
MsgBox "Number of the feature layers " & _
"in the active map: " & lCount
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -