Error in Macros - PDF generated report

Chefj0602

New Member
Joined
Sep 20, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,
I am using a tool for a food fraud assessment that is based in excel that I inherited from my predecessor. There are five tabs of data that should generate a PDF report when clicking the "create report" button. When I do it asks me to confirm the name and confirm the save file path. The error is shown below. I have saved the document and cannot generate the report unless it is open. when I click the "debug" button i get the 2nd image. Can anyone help?

1695241744527.png


1695241878670.png
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
is REPORTNAME a correct and valid path?
does REPORTNAME already exist, and maybe open?
 
Upvote 0
is REPORTNAME a correct and valid path?
does REPORTNAME already exist, and maybe open?
I really appreciate your response ranman256. I am not strong in macros and do not know how to answer that question. After clicking the "Create Report" button, a dialog box appears that asks if the company name is correct (this is a field that I fill out and matches exactly), then a 2nd dialog box appears (shown below) I have no way to change this path and can only select "ok" or "cancel". When I click "ok" a new dialog box appears that shows a load bar that just before it is complete, I get the runtime error shown in the original post.
 
Upvote 0

Forum statistics

Threads
1,215,131
Messages
6,123,222
Members
449,091
Latest member
jeremy_bp001

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