KIM Chanthan
Member
Hi,
I want to copy data from one sheet and want to paste it in new sheet of another workbook (Master file).
Below code work perfectly as expected, but because of the link, all the data become #VALUE! when i reopen it or share master file to other people.
So could anyone tell me how to solve with it?
>>> use code - tags <<<
Thanks,
I want to copy data from one sheet and want to paste it in new sheet of another workbook (Master file).
Below code work perfectly as expected, but because of the link, all the data become #VALUE! when i reopen it or share master file to other people.
So could anyone tell me how to solve with it?
>>> use code - tags <<<
Code:
Sub ConsolidateBPbyccy()
Dim FolderPath As String
Dim Filename As String
Dim Sheet As Worksheet
Application.ScreenUpdating = False
FolderPath = ActiveWorkbook.Path & "\"
Filename = Dir(FolderPath & "*.xlsx*")
D = 1
Do While Filename <> ""
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
Workbooks.Open Filename:=FolderPath & Filename, ReadOnly:=True
Worksheets("Product").Copy After:=ThisWorkbook.Sheets(D)
Workbooks(Filename).Close Savechanges:=False
ActiveSheet.Name = Range("C4").Value
Filename = Dir()
D = D + 1
Loop
Application.AskToUpdateLinks = True
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Thanks,
Last edited by a moderator: