Raphaël
Raphaël

Reputation: 21

"method saveas of object _workbook failed with excel 2010 but not with excel 2016

I think it is probably a small mistake but I get the following message with excel 2010 "method saveas of object _workbook failed" but not with 2016 (works smoothly).

wb4.SaveAs FileName:="M:\Sites\Braine\GTSO\Supply Chain\GSC Reporting & Analytics\CDP-OMP\CDP\1. Sales & Stock Monthly import\" & year2 & "\" & bMonth2 & "\Workfile" & Date & ".xlsx", FileFormat:=51, CreateBackup:=False

Any ideas?

Thank you for your help!

Upvotes: 1

Views: 478

Answers (1)

Raphaël
Raphaël

Reputation: 21

You are using Date in filename, maybe it give an unaccepted character in file name like "/" (Fadi Comment)

Upvotes: 1

Related Questions