I'm trying to copy values from a temp file and paste to my active workbook. The macro is copying the formulas. See code below:
Private Sub CommandButton1_Click()
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").Copy wsA.Range("O40")
ws.Range("E31").Copy wsA.Range("O41")
ws.Range("F31").Copy wsA.Range("O42")
ws.Range("G31").Copy wsA.Range("O43")
ws.Range("H31").Copy wsA.Range("O44")
ws.Range("I31").Copy wsA.Range("O45")
ws.Range("J31").Copy wsA.Range("O46")
ws.Range("K31").Copy wsA.Range("O47")
ws.Range("L31").Copy wsA.Range("O48")
ws.Range("M31").Copy wsA.Range("O49")
ws.Range("N31").Copy wsA.Range("O50")
ws.Range("O31").Copy wsA.Range("O51")
ws.Range("P31").Copy wsA.Range("O52")
ws.Range("Q31").Copy wsA.Range("O53")
ws.Range("R31").Copy wsA.Range("O54")
ws.Range("S31").Copy wsA.Range("O55")
wbS.Close False
End Sub
Private Sub CommandButton1_Click()
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").Copy wsA.Range("O40")
ws.Range("E31").Copy wsA.Range("O41")
ws.Range("F31").Copy wsA.Range("O42")
ws.Range("G31").Copy wsA.Range("O43")
ws.Range("H31").Copy wsA.Range("O44")
ws.Range("I31").Copy wsA.Range("O45")
ws.Range("J31").Copy wsA.Range("O46")
ws.Range("K31").Copy wsA.Range("O47")
ws.Range("L31").Copy wsA.Range("O48")
ws.Range("M31").Copy wsA.Range("O49")
ws.Range("N31").Copy wsA.Range("O50")
ws.Range("O31").Copy wsA.Range("O51")
ws.Range("P31").Copy wsA.Range("O52")
ws.Range("Q31").Copy wsA.Range("O53")
ws.Range("R31").Copy wsA.Range("O54")
ws.Range("S31").Copy wsA.Range("O55")
wbS.Close False
End Sub