title: Breaking WorksheetFunction after using worksheet index?
body: <p>I built a bunch of VBA code (fully tested and seems to be working) that includes lines such as</p>
  
  <pre><code>worker = WorksheetFunction.Match(Sheets("workerlist").Range("A1"), Sheets("master").Range("A1:A20"), 0)
  </code></pre>
  
  <p>I'm trying to improve my code by referencing the sheets by index number, so I replaced <code>Sheets("workerlist")</code> with <code>Sheets(1)</code>, and the line breaks down and returns a runtime error saying it's unable to get the Match property of WorksheetFunction class.</p>
  
  <p>Can the two not work together? Is there any other way to improve my referencing? When I try to look up the problem I just keep ending up with pages on using <code>WorksheetFunction.Index</code>.</p>