Run-Time Error'-2147221080(800401a8)': Automation Error

G

Guest

The following code gives the error message.
I thought at first it had to do with saving to an existing file that was
protected, so I changed the code so that the original QCNum.xls file
is deleted.
The with-end with statement is used elsewhere in the macro and works fine.
Why does this particular one cause and error? and how to 'correct' it?

'Updated info has been 'transfered' into QCNum_1, so name it
'QCNUM.xls, and protect it
With myQCNum_1
.SaveAs ([QCNum.xls"])
.Close SaveChanges:=True
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top