Protected VB code - Run-time error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My code runs fine, however when I protect the code from viewing I get the
following run-time error:

Method 'SaveAs' of object'_Workbook' failed

Here is the only code I have for saving the file:
ActiveWorkbook.SaveAs Filename:=SourceName, FileFormat:=xlTextPrinter,
CreateBackup:=False

TIA
 

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

Back
Top