title: Error number 5 when I try to run this VBA code
body: <pre><code>Sub SOLAR()
  '
  ' SOLAR Macro
  ' SOLAR CALCULATION
  '
  
  '
      Application.Goto Reference:=&quot;SOLAR&quot;
      
      Dim c_size As Single
      Dim current As Integer
      Dim cable_length As Integer
      Dim voltage_drop_rate As Integer
      Dim c_capacity As Integer
      Dim v_drop As Integer
      Dim load As Integer
      Dim energy_units As Integer
      Dim panel_number As Single
      Dim energy As Integer
      Dim found As Integer
      Dim no_panels_req As Single
      Dim no_panels As Integer
      Dim panels As Integer
        
     'pick details from Panel size and calculate panel size
          
               If (load &lt;&gt; Empty) And (energy &lt;&gt; Empty) Then
                  found = 0
                  
     
                  energy_units = Worksheets(&quot;SOLAR&quot;).Range(&quot;LOAD&quot;).Cells(&quot;I33&quot;).Value
                      load = Worksheets(&quot;SOLAR&quot;).Range(&quot;LOAD&quot;).Cells(&quot;I34&quot;).Value
                         PSH = Worksheets(&quot;SOLAR&quot;).Range(&quot;REGION&quot;).Cells(&quot;E24&quot;).Value
     
                                      no_panels_req = ((energy_units * 1.2) / PSH) * 1000
                     
                     no_panels = no_panels_req
                     
     End If
                  panels = no_panels
                  
  End Sub
  </code></pre>