G
Guest
Hello,
I am using the following code to create workbook for each sheet that I have
in my main workbook. It works fine, my problem is links. Sheets have links to
other files and I need to get rid of them by keeping the values. Is there any
way I can break links and save the current values during SaveAs below?
Sub test()
Dim a As Integer
Dim wb As Workbook
Application.ScreenUpdating = False
For a = 1 To ThisWorkbook.Worksheets.Count
ThisWorkbook.Sheets(a).Copy
Set wb = ActiveWorkbook
wb.SaveAs "C:\Tmp\" & wb.Sheets(1).Name & ".xls"
wb.Close False
Set wb = Nothing
Next a
Application.ScreenUpdating = True
End Sub
Thanks,
Jim.
I am using the following code to create workbook for each sheet that I have
in my main workbook. It works fine, my problem is links. Sheets have links to
other files and I need to get rid of them by keeping the values. Is there any
way I can break links and save the current values during SaveAs below?
Sub test()
Dim a As Integer
Dim wb As Workbook
Application.ScreenUpdating = False
For a = 1 To ThisWorkbook.Worksheets.Count
ThisWorkbook.Sheets(a).Copy
Set wb = ActiveWorkbook
wb.SaveAs "C:\Tmp\" & wb.Sheets(1).Name & ".xls"
wb.Close False
Set wb = Nothing
Next a
Application.ScreenUpdating = True
End Sub
Thanks,
Jim.