I am trying to copy a column of data from one workbook and paste its values to another workbook. I am able to just use regular copy paste, but when I try to paste values it returns blanks. I am new to VBA so there is maybe something I am missing with the syntax? Here is my code:
Sub ImportData()
Dim FileLocation As String
FileLocation = Application.GetOpenFilename
If FileLocation = "False" Then
Beep
Exit Sub
End If
Application.ScreenUpdating = False
Set ImportWorkbook = Workbooks.Open(Filename:=FileLocation)
ImportWorkbook.Worksheets(2).Range("C4:D25").Copy ThisWorkbook.Worksheets(1).Range("A1")
ImportWorkbook.Worksheets(2).Range("G4:G25").Copy
Range("C1").PasteSpecial xlPasteValues
ImportWorkbook.Close
Application.ScreenUpdating = True
End Sub