title: VBA Run-time error 91 - Object variable or with block variable not set
body: <p>I'd be grateful for some guidance. I'm new to coding and this has got me really stumped.</p>
  
  <p>I keep getting a Run-time error 91 with the following code, although it actually works as intended. </p>
  
  <p>The error is at <code>Set wd = wb.Sheets("Sitel Audit")</code> although it accurately pulls from the active worksheet to the new one named Sitel Audit.</p>
  
  <pre><code>Private Sub Extract()
  
  
  Dim FileYear As String
  Dim FileMonth As String
  Dim AgentName As String
  Dim Agreement As String
  Dim CallDate As String
  Dim wb As Workbook
  Dim wd As Worksheet
  Dim a As String
  Dim b As String
  Dim c As String
  Dim d As String
  Dim e As String
  Dim f As String
  Dim g As String
  Dim h As String
  Dim i As String
  Dim j As String
  Dim k As String
  Dim l As String
  Dim m As String
  Dim n As String
  Dim o As String
  Dim p As String
  Dim q As String
  Dim r As String
  Dim found As Range
  Dim wtf As Range
  
  Set wb = Workbooks.Open("C:\Users\matthew.varnham\Desktop\QA Improvements\SITEL - Inbound Tracker.xlsm")
  Set wd = wb.Sheets("Sitel Audit")
  Set wtf = Sheets("Observation Sheet").Range("E8")
  Set found = wd.Columns("E:E").find(what:=wtf, LookIn:=xlValues, lookat:=xlWhole)
  
  Set wss = Sheets("Observation Sheet")
  a = wss.Range("F17").Value '1
  b = wss.Range("F20").Value '2
  c = wss.Range("F21").Value '3
  d = wss.Range("F22").Value '4
  e = wss.Range("F23").Value '5
  f = wss.Range("F26").Value '6
  g = wss.Range("F27").Value '7
  h = wss.Range("F28").Value '8
  i = wss.Range("F30").Value '9
  j = wss.Range("F31").Value '10
  k = wss.Range("F34").Value '11
  l = wss.Range("F35").Value '12
  m = wss.Range("F36").Value '13
  n = wss.Range("F37").Value '14
  o = wss.Range("F40").Value '15
  p = wss.Range("F41").Value '16
  q = wss.Range("F44").Value '17
  r = wss.Range("F47").Value '18
  
  
  
  wd.Range("P" &amp; found.Row).Value = a
  wd.Range("Q" &amp; found.Row).Value = b
  wd.Range("R" &amp; found.Row).Value = c
  wd.Range("S" &amp; found.Row).Value = d
  wd.Range("T" &amp; found.Row).Value = e
  wd.Range("U" &amp; found.Row).Value = f
  wd.Range("Y" &amp; found.Row).Value = g
  wd.Range("Z" &amp; found.Row).Value = h
  wd.Range("AB" &amp; found.Row).Value = i
  wd.Range("AC" &amp; found.Row).Value = j
  wd.Range("AD" &amp; found.Row).Value = k
  wd.Range("AE" &amp; found.Row).Value = l
  wd.Range("AF" &amp; found.Row).Value = m
  wd.Range("AG" &amp; found.Row).Value = n
  wd.Range("AH" &amp; found.Row).Value = o
  wd.Range("AI" &amp; found.Row).Value = p
  wd.Range("AJ" &amp; found.Row).Value = q
  wd.Range("AK" &amp; found.Row).Value = r
  
  wb.Save
  Workbooks(1).Close
  
  End Sub
  </code></pre>
  
  <p>Thanks for your help!</p>