title: VBA TreeView_NodeCheck: Search for Match in Column and post in row beneath if empty
body: <p>I am trying to work around the tough task to save selected nodes from a TreeView (tough due to my limited VBA knowledge) by first saving a UserID with a TextBox_AfterUpdate Event and subsequently saving the checked node's full path in the rows below when a match is found. Multiple checks are possible, that's why I approached it the way I did below. </p>
  
  <p>I am working on this Problem for 2 working-days now and pray that one of you can help me out of my misery here haha
  No Error is produced and a look at the Debugger Shows me that each column in found correctly. Also, the saving user ID via TextBox_AfterUpdate Event works like a treat and should stay this way. It simply does not copy it - please Help.</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code>Private Sub SuppNo_AfterUpdate()
  '########Save SuppNo for CG-entry-saving########
      Dim wb As Workbook
      Set wb = ActiveWorkbook
      Dim ws As Worksheet
      Set ws = wb.Worksheets("Supplier Skills")
  
      Dim lastcol As Long
  
      With ws
          lastcol = .Cells(1, .Columns.Count).End(xlToLeft).Column
      End With
      'Copy Supplier No into Row 1 and next empty column
  
      ws.Cells(1, lastcol).Offset(0, 1).Value = Me.SuppNo.Value
  End Sub
  
  '------------------------------------------------------------------------------------------
  
  Private Sub CGTreeView_NodeCheck(ByVal Node As MSComctlLib.Node)
  
      Dim wb As Workbook
      Set wb = ActiveWorkbook
      Dim ws As Worksheet
      Set ws = wb.Worksheets("Supplier Skills")
      Dim myNode As Node
  
      '1. - - Copy Supplier No into Row 1 and next empty column
      'Done in SuppNo_Change event
  
  
      '2.1. - - Find matching entry
      Dim aCell As Range
      Dim col As Long, lRow As Long, i As Long
      Dim colName, NodePath As String
  
      strFind = Me.SuppNo
      NodePath = Me.CGTreeView.SelectedItem.FullPath
  
  
      With ws
          Set aCell = .Range("A1:ZZ1").Find(What:=Me.SuppNo, LookIn:=xlValues, LookAt:=xlWhole, _
                                            SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False)
  
          '~~&gt; If Found
          If Not aCell Is Nothing Then
              col = aCell.Column
              colName = Split(.Cells(, col).Address, "$")(1)
  
              lRow = .Range(colName &amp; .Rows.Count).End(xlUp).Row
  
              '2.2. - - Find the last empty row and copy each new FullPath when checked
              For i = 2 To 50
                  If Cells(i, col) Is Nothing Then
                      ws.Cells(i, col) = NodePath
                      i = i + 1
                  End If
              Next i
  
              '~~&gt; If not found
          Else
              Exit Sub
          End If
      End With
  
  End Sub
  </code></pre>