ExportAsFixedFormat - After Publishing As PDF, The Excel File Freeze For a Long Time

Matt29108

New Member
Joined
Aug 4, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
have you tried this?

VBA Code:
Sub test()
    'set before your code
    Application.Calculation = xlCalculationManual
    
    'your code here
    
    'set after your code
    Application.Calculation = xlCalculationSemiautomatic
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top