Hello,
I used ExportAsFixedFormat Function to print my 50 tabs as PDF. Right after publishing those tabs as one PDF, the excel file freezes. By the time excel freezes, I already obtain the PDF file so the problem starts AFTER saving it as PDF file. I suspect that the excel calculates the whole workbook from scratch after publishing. That creates a problem because I have a data table which takes around 20 min to calculate. I did not wait for 20 min to see if freezing disappears but in another of my excel file, which has very small data sheet, the freezing disappears in appr. 15 seconds.
- My calculation format is automatic except date tables.
- I also tried adding Application.Calculation = xlCalculationSemiautomatic. But it did not make a difference.
Is there any way to make the freezing disappear?
Thanks,
Matt
Here is my code below.
Sub Export_to_PDF()
Dim wb As Workbook
Dim ws As Worksheet
Dim ws_Parametreler As Worksheet
Set wb = ActiveWorkbook
Set ws_Parametreler = wb.Worksheets("Parametreler")
Application.DisplayAlerts = false
Application.AlertBeforeOverwriting = false
Application.DisplayStatusBar = false
Application.ScreenUpdating = false
Sheets(Array("Ana Sayfa", "Düz Levha", "L1", "L2", "L3", "L4", "L5", "L6", "Tip A", "A1", "A2", "A3", "A4", "A5", "A6", "Tip EF", "EF1", "EF2", "EF3", "EF4", "EF5", "EF6", "Tip ET", "ET1", "ET2", "ET3", "ET4", "ET5", "ET6", "Tip EM", "EM1", "EM2", "EM3", "EM4", "EM5", "EM6", "Tip EH", "EH1", "EH2", "EH3", "EH4", "EH5", "EH6", "Tip EHC", "EHC1", "EHC2", "EHC3", "EHC4", "EHC5", "EHC6")).Select
Application.PrintCommunication = False
ActiveSheet.ExportAsFixedFormat xlTypePDF, ws_Parametreler.Range("F11") & "\" & ws_Parametreler.Range("F14") & ".PDF", xlQualityStandard, True, False, , , True
Application.PrintCommunication = True
ws_Parametreler.Select
End Sub
I used ExportAsFixedFormat Function to print my 50 tabs as PDF. Right after publishing those tabs as one PDF, the excel file freezes. By the time excel freezes, I already obtain the PDF file so the problem starts AFTER saving it as PDF file. I suspect that the excel calculates the whole workbook from scratch after publishing. That creates a problem because I have a data table which takes around 20 min to calculate. I did not wait for 20 min to see if freezing disappears but in another of my excel file, which has very small data sheet, the freezing disappears in appr. 15 seconds.
- My calculation format is automatic except date tables.
- I also tried adding Application.Calculation = xlCalculationSemiautomatic. But it did not make a difference.
Is there any way to make the freezing disappear?
Thanks,
Matt
Here is my code below.
Sub Export_to_PDF()
Dim wb As Workbook
Dim ws As Worksheet
Dim ws_Parametreler As Worksheet
Set wb = ActiveWorkbook
Set ws_Parametreler = wb.Worksheets("Parametreler")
Application.DisplayAlerts = false
Application.AlertBeforeOverwriting = false
Application.DisplayStatusBar = false
Application.ScreenUpdating = false
Sheets(Array("Ana Sayfa", "Düz Levha", "L1", "L2", "L3", "L4", "L5", "L6", "Tip A", "A1", "A2", "A3", "A4", "A5", "A6", "Tip EF", "EF1", "EF2", "EF3", "EF4", "EF5", "EF6", "Tip ET", "ET1", "ET2", "ET3", "ET4", "ET5", "ET6", "Tip EM", "EM1", "EM2", "EM3", "EM4", "EM5", "EM6", "Tip EH", "EH1", "EH2", "EH3", "EH4", "EH5", "EH6", "Tip EHC", "EHC1", "EHC2", "EHC3", "EHC4", "EHC5", "EHC6")).Select
Application.PrintCommunication = False
ActiveSheet.ExportAsFixedFormat xlTypePDF, ws_Parametreler.Range("F11") & "\" & ws_Parametreler.Range("F14") & ".PDF", xlQualityStandard, True, False, , , True
Application.PrintCommunication = True
ws_Parametreler.Select
End Sub