title: How do I determine if an Excel range is hidden?
body: <p>In my code I include a boolean variable in which I want to assign the value of a range's hidden property. i.e. if the range is hidden, the variable should have the value true, and vice versa.</p>
  
  <p>While running the code I get a '1004' Run-time error - Unable to get the Hidden property of the Range class. By this I assume that Hidden property in this case is write-only (correct me if I'm wrong).</p>
  
  <p>Is there a way to determine (in my code, not by watching) whether a range/cell is hidden or not?</p>
  
  <p>I have a class named "minas" and with this sub I am trying to create a collection of minas based on some criteria. </p>
  
  <pre><code>Public mines As Collection
  Sub existing_months()
      Set mines = New Collection
      Dim min As minas
      Dim str As String
      Dim x As Range
      Dim y As Boolean
      For i = 1 To 12
          Set min = New minas
          Set x = Range("A1:A500").Find(i, LookIn:=xlValues, LookAt:=xlWhole)
          If x Is Nothing Then GoTo next_iteration:
          y = x.Hidden 'does not get the property
          Call min.initialize(x, y)
          str = min.minas &amp; "/" &amp; min.etos
          mines.Add min, str
          Debug.Print min.ref_range.Address &amp; " " &amp; min.end_cell
  next_iteration:
      Next
      Set min = Nothing
  End Sub
  </code></pre>