cheongmarcus
New Member
- Joined
- Mar 14, 2020
- Messages
- 16
- Office Version
- 365
- 2016
- 2013
- 2011
- Platform
- Windows
Hi, I am new to VBA and would really appreciate if anyone could help me with this. Currently, I am trying to only copy certain sheets out of a workbook and save it in new workbook. However, in my new workbook with those selected worksheets, when i go to Edit Links, there is link to my previous workbook. Is it possible to break this link? I would like to incorporate this in the VBA code, so then I will not need to open up this new workbook and manually go and break link.
I have this code to copy certain worksheets:
Sub Seperate_Sheets()
Dim Path1 As String
Path1 = ActiveWorkbook.Path & "\" & "Current Budget "
Sheets(Array("Expenses", "Revenues", "Previous Year Expenses", "Previous Year Revenue")).Copy
ActiveWorkbook.SaveAs Filename:=Path1, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
End Sub
However, I will want to break all links in this new workbook ("Current Budget"). What code and how can it be inserted inside this current code I am using?
Thank you! Any help will be very much appreciated!
I have this code to copy certain worksheets:
Sub Seperate_Sheets()
Dim Path1 As String
Path1 = ActiveWorkbook.Path & "\" & "Current Budget "
Sheets(Array("Expenses", "Revenues", "Previous Year Expenses", "Previous Year Revenue")).Copy
ActiveWorkbook.SaveAs Filename:=Path1, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
End Sub
However, I will want to break all links in this new workbook ("Current Budget"). What code and how can it be inserted inside this current code I am using?
Thank you! Any help will be very much appreciated!