title: Excel 2016 VBA backward compatibility issue to 2013
body: <p>I have a simple VBA code, created in Excel 2016, that hides some rows in other sheets based on whether a user inputs "yes/no". Unfortunately, it does not run in Excel 2013.  </p>
  
  <p><em>The error message is:</em>  </p>
  
  <blockquote>
    <p>Run-time error '1004'  Application-defined or object-defined error.</p>
  </blockquote>
  
  <p>The debug highlight is in row 9 that starts with <code>If nmdrange</code>.<br>
  Is there any way to make it backward-compatible? </p>
  
  <pre><code>Sub Worksheet_Change(ByVal Target As Range)
      Dim nmdrange As Name
      Dim Row As Range
  
      If Not Intersect(Target, Range("screener1")) Is Nothing Then
          'Input data sheet
          With Sheet4
              For Each nmdrange In ThisWorkbook.Names
                  If nmdrange.RefersToRange.Parent.Name = .Name Then '***ERROR HERE***
                  'Loop over benefits
                  .Range(nmdrange.RefersTo).Rows.EntireRow.Hidden = (.Range(nmdrange.RefersTo).Cells(1, 1).Value = "No")
                  End If
              Next nmdrange
          End With
  
          With Sheet5
              For Each nmdrange In ThisWorkbook.Names
                  If nmdrange.RefersToRange.Parent.Name = .Name Then 
                  'Loop over benefits
                  .Range(nmdrange.RefersTo).Rows.EntireRow.Hidden = (.Range(nmdrange.RefersTo).Cells(1, 1).Value = "No")
                  End If
              Next nmdrange
              'Hide in summary table
              For Each Row In .Range("sum_b1").Rows
                  Row.Rows.EntireRow.Hidden = (Row.Rows.Cells(1, 1).Value = "No")
              Next Row
          End With
  
      End If
  End Sub
  </code></pre>
  
  <p>There are two named ranges that refer not to a range but a single cell/value such as:
  <a href="https://i.stack.imgur.com/mQpVF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mQpVF.png" alt="enter image description here"></a></p>