Private Sub Tool_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ''''' Populates layer combo box. Iterates through TOC and populates the combo box with available layers On Error GoTo EH Dim pMxDoc As IMxDocument Dim pMap As IMap pMxDoc = My.ArcMap.Application.Document pMap = pMxDoc.FocusMap Dim pLayer As ILayer Dim i As Integer If pMap.LayerCount = 0 Then Exit Sub End If For i = 0 To pMap.LayerCount - 1 pLayer = pMap.Layer(i) cmbLayer.Items.Add(pMap.Layer(i).Name) Next i Exit Sub EH: Debug.Print(Err.Number & " " & Err.Description) End Sub