WxShady13
Board Regular
- Joined
- Jul 24, 2018
- Messages
- 185
- Office Version
- 365
- Platform
- Windows
- Mobile
I am creating an Archive macro that when pressed will send a worksheet from one workbook to another. Currently the code will open the workbook and send the worksheet and then delete it from the original workbook. The problem I am having is saving the destination workbook after it has been opened. It is named CMD-Archive and sits in a Doc Library on a SharePoint site where the source file sits. What am I doing wrong?
Code:
Sub Archive()
'Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
Workbooks.Open "FILENAME", UpdateLinks = False
ThisWorkbook.ActiveSheet.Copy After:=Workbooks("CMD-Archive.xlsm").Sheets(1)
Workbooks("CMD-Archive.xlsm").Activate
Application.DisplayAlerts = False
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Sub
Last edited: