Phil_Pearce
New Member
- Joined
- Feb 19, 2009
- Messages
- 30
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?
Code:
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