title: Trying to select last row and column in VBA
body: <p>I have been stuck on this for the longest time and it is probably an easy fix I am not seeing. I am trying to select that last row of a table and create a border around it up until the last column. "POS" is the name of the worksheet I am working in. "BRangePOS" is me saying this is where the table begins.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>Set BRangePOS = POS.Range("A1")
      With BRangePOS
          With POS
              lrowPOS = .Cells(.Rows.Count, 1).End(xlUp).Row
              lcolPOS = .Cells(1, Columns.Count).End(xlToLeft).Column
          End With
      End With
  
      POS.Range(lrowPOS, lcolPOS).BorderAround Weight:=xlMedium
  </code></pre>
  
  <p>The error I get is a "Method ' Range' of Object_'Worksheet' Failed"</p>
  
  <p>Any help would be great.</p>
  
  <p>Thanks,</p>
  
  <p>G</p>