redbaron06
New Member
- Joined
- Aug 6, 2010
- Messages
- 44
Hi All,
I am using the below code to open a series of workbooks and change their file type to .xls (file type 56). The code takes a fusterating 35 minutes to run, and is part of a series of other modules. Anyone have any suggestions on how I could make this faster/more efficient? It seems that when each workbook opens, and after it is renamed it runs calculations despite ".Calculation = xlManual."
Thanks in advance!
I am using the below code to open a series of workbooks and change their file type to .xls (file type 56). The code takes a fusterating 35 minutes to run, and is part of a series of other modules. Anyone have any suggestions on how I could make this faster/more efficient? It seems that when each workbook opens, and after it is renamed it runs calculations despite ".Calculation = xlManual."
Thanks in advance!
Code:
Sub SaveTheFile()
Dim C As Range
Dim wb As Workbook
Dim wbName As String
Dim Tango1 As String
Dim Whiskey1 As String
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For Each C In Range("W2:W69")
Tango1 = Range("C18").Value
Whiskey1 = "[****_***_*******]_POST_" & C
Workbooks.Open filename:=Tango1 & "[****_***_*******]_POST_" & C & ".xls"
Workbooks(Whiskey1).Activate
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Tango1 & C & ".xls", FileFormat:=56
Application.DisplayAlerts = True
ActiveWorkbook.Close
Next C
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub