Macro error when macro save as a new file name

Hi

When a robot execute a macro and it has a line which saves a file as a new name at the end of the macro, a new blank file opens (I don’t know why) and an error occurs.

It sometimes works, and it sometimes doesn’t work…
I use excel application scope to execute the macro.

Why does it happen??

Can you share the code for the macro?