title: "ThisWorksheet" equivalent?
body: <p>In Excel, I have some macros that are part of a <em>Worksheet</em> module.  </p>
  
  <p>In the code, I want to make sure that the ranges referred to are part of that worksheet.</p>
  
  <p>For example, in my <code>Main Sheet</code> worksheet module, say I have:</p>
  
  <pre><code>Sub test()
  Dim rng as Range
  Set rng = Range("A1")
  End Sub
  </code></pre>
  
  <p>Of course, I want to explicitly give the worksheet the range is on. Typically, I'd do </p>
  
  <pre><code>Set rng = Worksheets("Main Sheet").Range("A1")
  </code></pre>
  
  <p>But I'm curious, since I have my code in a worksheet module, how can I refer to that worksheet? I was thinking something like <code>ThisWorksheet</code> but that's not a method in VBA (but <code>ThisWorkbook</code> is, which is why I thought to try it).</p>
  
  <p>My only other thoughts are that since my macro is inside a worksheet module, the "unassigned" range variable implicitly refers to the <code>Main Sheet</code> and <strong>can not</strong> refer to any other worksheet's cells.</p>
  
  <p>Do I understand that correctly, or is there some way to refer to the worksheet the code running is stored in?</p>