Ashhu
Active Member
Dear Friends
Please help me here,
I am trying to copy data from one workbook to another.
the source workbook from where i copy , i have option to choose and
the destination folder workbook name is dynamic, so i save the file name and call in code.
but it turns out to be some issue while i call for it and show up error.
need help to locate prob.
Please help me here,
I am trying to copy data from one workbook to another.
the source workbook from where i copy , i have option to choose and
the destination folder workbook name is dynamic, so i save the file name and call in code.
but it turns out to be some issue while i call for it and show up error.
need help to locate prob.
Code:
Sub RetrieveFileName()
Dim sFileName As String
Dim Destination As String
Destination = ActiveWorkbook.FullName
sFileName = Application.GetOpenFilename
Workbooks.Open sFileName
Worksheets("Consolidated").Activate
ActiveSheet.Range("A1").CurrentRegion.Copy Destination:=Workbooks(Destination).Worksheets("Sheet1").Range("a1")