Quote Originally Posted by TysonLPrice View Post
Take a look at task manager and see if you have multiple Excel applications running.
Hi,
I added the two blocks of code below and I do not have multiple Excel open in the Task Manager, but it still stops at "ExportAsFixedFormat" line after creating a number of PDF files.

I added this code in the first part of the code that is in my question:
Code:
System.Runtime.InteropServices.Marshal.ReleaseComObject(oRng)
oRng = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(oSheet)
oSheet = Nothing
oWB.Close()
System.Runtime.InteropServices.Marshal.ReleaseComObject(oWB)
oWB = Nothing
oXL.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(oXL)
oXL = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
GC.Collect()
GC.WaitForPendingFinalizers()
And I put this code in the second part of the code:
Code:
xwb.Close(False)
xwb = Nothing
xl.Quit()
xl = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()