I'm trying to import a series of cell values and cell names from another workbook. The code I have works, it just doesn't do what I want it to do.
Sub Import()
Dim ImpCell As Range
Dim Import As Worksheet
Dim Destination As Worksheet
Set Destination = Workbooks("Book2").Sheets("Dump")
Set Import = Workbooks("Book1").Sheets("Data")
Import.Activate
Set ImpCell = Cells(1, 1)
Destination.Activate
Cells(1, 1) = ImpCell.Value
Cells(1, 2) = ImpCell.Name
End Sub
Destination receives the value correctly in cells(1,1) but cells(1,2) receives =Data!$A$1 instead of the actual name of the cell reference. Any reasons why it does this or other ideas of how to approach this?
Bookmarks