Hello Friends,
Please look at this small code I am using in a blank workbook named as UPDATE_FILE. The code works fine when this workbook is open directly.
But when I try to open this workbook (UPDATE_FILE) from another workbook (REPORTS), it just pauses on this line of the code
After that it does nothing. Can someone please guide me what is going wrong.
Regards,
Humayun
Please look at this small code I am using in a blank workbook named as UPDATE_FILE. The code works fine when this workbook is open directly.
VBA Code:
Private Sub Workbook_Open()
Workbooks("REPORTS.xlsm").Close savechanges:=False
FileCopy "C:\OneDrive\Documents\REPORTS.xlsm", "C:\ITEX DATA\REPORTS.xlsm"
Workbooks.Open "C:\ITEX DATA\REPORTS.xlsm"
Workbooks("UPDATE_FILE").Close savechanges:=False
End Sub
But when I try to open this workbook (UPDATE_FILE) from another workbook (REPORTS), it just pauses on this line of the code
VBA Code:
Workbooks("REPORTS.xlsm").Close savechanges:=False
After that it does nothing. Can someone please guide me what is going wrong.
Regards,
Humayun