I have a macro that creates a PDF of a sheet in my workbook and saves it to a specific location. I created this workbook using Excel 2010 and the macro works fine. However, I need to use it on a different computer that has Excel 2007 and for some reason, I keep getting a VBA runtime error 5 when I try to run the macro. The macros are enabled, and the location the spreadsheet is trying to save the PDF exists. Also, I've used this workbook on other computers with Excel 2007 without a problem. This computer also has Adobe and there is an option to manually save as a PDF, so I'm pretty sure the problem is with some sort of security setting or something like that, but I just can't figure out what it is. Here is the beginning of the code. There is more, but the debug says the last line shown is what is causing the problem.
Sub Macro3()
'
'export and save PDF
Sheets("Credit Criterion Check").Select
ActiveSheet.ExportAsFixedFormat Type:=x1TypePDF, Filename:= _
"C:\CREDIT CRITERION CHECK\" & ActiveSheet.Range("C1").Value & ".pdf", OpenAfterPublish:=True
Sub Macro3()
'
'export and save PDF
Sheets("Credit Criterion Check").Select
ActiveSheet.ExportAsFixedFormat Type:=x1TypePDF, Filename:= _
"C:\CREDIT CRITERION CHECK\" & ActiveSheet.Range("C1").Value & ".pdf", OpenAfterPublish:=True