cancel
Showing results for 
Search instead for 
Did you mean: 

Run-time error '91' Object variable or With block variable not set when Exporting to Excel

0 Kudos

Hi, Experts

After upgrading Excel build (2016 to 2016), we started to get an error message "Run-time error '91' Object variable or With block variable not set" when Exporting to Excel.

When debugging the error, we get this as the breakpoint: fname = Workbooks.Application.ActiveWorkbook.Path & "\PathToExcelDoc.txt"

We are running 9.1 PL8

I have configured Excel to allow any VBA/Macro on trust settings, which I saw here as probable causes.

I have tried to running Excel/SAP with the same permissions (Admin and non-admin).

Checked MDAC version compatibilities.

Checked .NET compatibilities.

Checked SAP Support Matrix compatibilities.

And, finally, rolled back to the previous build, but the error persists.

Is there anything I missed here?

Thanks,

Felipe

Accepted Solutions (0)

Answers (0)