?? vba14-1.txt
字號:
Private Function FindLayer(strBrowseName As String) _
As ILayer
' Find the matching layer in the focus map.
' Return NOTHING if not found.
Dim lngIndex As Long
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pDataset As IDataset
Set FindLayer = Nothing
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
' Loop through layers and search
' for the matching name.
For lngIndex = 0 To (pMap.LayerCount - 1)
If TypeOf pMap.Layer(lngIndex) Is FeatureLayer Then
Set pDataset = pMap.Layer(lngIndex)
If pDataset.BrowseName = strBrowseName Then
Set FindLayer = pMap.Layer(lngIndex)
Exit For
End If
End If
Next lngIndex
End Function
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -