title: Copy (Import) cells from another spreadsheet into active sheet
body: <p>I'm a very novice VBA programmer. I only get to do it in my downtime between work things. Anyways I have been working on an incident tracker for myself and colleagues and to help them out when I update it with new features I have been trying to add an "Import" feature. </p>
  
  <p>The thing is there is a separate worksheet for each month (Jan to Dec and another sheet for overtime called OT). The code needs to copy from the correct sheet and paste into the sheet with the same name.</p>
  
  <p>I can't quite get it to work though. This is what I have so far:</p>
  
  <pre><code>'Import Incident
  Sub ImportIncidents()
  
  Dim OpenFileName As String
  Dim wb As Workbook
  Dim ws As Worksheet
  Dim myRng As Range
  Dim MyWB As Workbook
  
  'store the current workbook in a variable
  Set MyWB = ActiveWorkbook
  
  'Select and Open workbook
  OpenFileName = Application.GetOpenFilename
  
  If OpenFileName = False Then
      MsgBox ("Import Failed!")
      Exit Sub
  End If
  
  Set wb = Workbooks.Open(OpenFileName, UpdateLinks:=0)
  
  'Get data
  wb.Activate
  For Each ws In wb.Worksheets
  
                  Set myRng = ws.Range("A6:AV45")
                  myRng.Copy
                  MyWB.Activate
  
  
                  Set myRng =
  
                  wb.Activate
  
  Next
  
  
  MsgBox ("Import Complete!")
  
  End Sub
  </code></pre>
  
  <p>If anyone could help me out that would be amazing. I am sure I will be able to get the hang of it after I work through my VBA book properly (VBA for Dummies, ahah!) But I am having trouble finding a weekend to sit down and do it when I do a lot of overtime.</p>