So it worked perfectly!... Until I tried to use it for some additional cells that I wanted to copy from the temp file to the active worksheet "overview". What am I doing wrong? The error I recieved is as follows:
Run Time Error '1004' PasteSpecial method of Range class failed.
See code below:
Dim wbS As Workbook
Dim ws As Worksheet, wsA As Worksheet
Dim myFile As String
Set wsA = ThisWorkbook.Sheets("overview")
myFile = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
Set wbS = Workbooks.Open(myFile, False, True)
Set ws = wbS.Sheets("DAILY TALLY")
ws.Range("D31:S31").Copy
wsA.Range("O40").PasteSpecial Paste:=xlPasteValues, Transpose:=True
ws.Range("U31:W31").Copy
wsA.Range("J48").PasteSpecial Paste:=x1PasteValues, Transpose:=True
Run Time Error '1004' PasteSpecial method of Range class failed.
See code below:
Dim wbS As Workbook
Dim ws As Worksheet, wsA As Worksheet
Dim myFile As String
Set wsA = ThisWorkbook.Sheets("overview")
myFile = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
Set wbS = Workbooks.Open(myFile, False, True)
Set ws = wbS.Sheets("DAILY TALLY")
ws.Range("D31:S31").Copy
wsA.Range("O40").PasteSpecial Paste:=xlPasteValues, Transpose:=True
ws.Range("U31:W31").Copy
wsA.Range("J48").PasteSpecial Paste:=x1PasteValues, Transpose:=True