- Feb 19, 2009
I have written the below code to save as all open workbooks apart from the workbook which contains the macro. It will save all the files including the macro workbook. What am i doing wrong?
Sub save_All() Dim wbk As Workbook Application.ScreenUpdating = False For Each wbk In Workbooks If wbk.Name <> "macro.XLS" Then Debug.Print wbk.Name With wbk .SaveAs Filename:="N:\Invest\Shared\test\transfer " & wbk.Name & ".csv" End With End If Next wbk Application.ScreenUpdating = True End Sub