confusion123
Active Member
- Joined
- Jul 27, 2014
- Messages
- 400
I have three workbbooks, Thisworkbook, Source and Destination and am trying to copy a column of data from Source to Destination.
Can someone please tell me what is wrong with my code?
Thanks
EDIT SORTED: Apparently nothing's wrong! It seems to work literally as I posted this.
Code:
Dim SourceDataObj As Object
Set SourceDataObj = GetObject(PathName:="C:\Temp\Source Data.xlsx")
Dim DestDataObj As Object
Set DestDataObj = GetObject(PathName:="C:\Temp\Dest Data.xlsx")
SourceDataObj.Worksheets("Data").Columns(1).Copy Destination:=DestDataObj.Worksheets("CopiedData").Columns(1) 'FAILS HERE
Can someone please tell me what is wrong with my code?
Thanks
EDIT SORTED: Apparently nothing's wrong! It seems to work literally as I posted this.
Last edited: