Hi Guys,
I'm using this code to export 3 select worksheets in my workbook to a new file which in essence works great.
Sub ExportNew()
Dim FileName As String
Dim Path As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Path = "C:\This location\"
FileName = "New File " & Range("A1").Value & ".xlsx"
Sheets(Array("Data", "Pivot", "Mapping")).Copy
With ActiveWorkbook
.SaveAs Path & FileName, xlOpenXMLWorkbook
End With
ActiveWorkbook.Close
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
The problem I'm having now though is that when the sheets are exported, as the 3 sheets refer to eachother (data on one sheet, mapping on the 2nd and pivot on the other), the new file ends up with formula links to the original workbook, which is not ideal.
Does anyone have any suggestions how I can resolve this issue with VBA or otherwise?
Thanks,
Spoonman
Bookmarks