⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vba14-1.txt

📁 ao的一些代码集合
💻 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -