Save a file with Protected Macro

  • Thread starter Thread starter Tobie Hanekom
  • Start date Start date
T

Tobie Hanekom

I have developed a file with a macro which is protected by a password. A
"Save" button with the assigned macro calls the procedure in the macro and
when I am trying to save a file the following message appears

"You cannot save this file format when the VBA Project is protected

You may unprotect the VBA Project by......"

What do you suggest I do to save a file with a protected macro? The macro
must be protected, it is very important for me not to allow access to the
macro in totallity.

I am using certain cells' information to rename the file different from the
master

My code looks like this

ActiveWorkbook.SaveAs "C:\Anchor\PersLine Quotes\" &
Range("FileName").Value

Tobie
 
Are you trying to save as a normal workbook?

I'm betting you're saving as a format that didn't support protected projects
(xl95???).
 
Dave

Thank you for your response

I am using Excel 2000 Prof

The file was saved in Microsoft 97-2000 & 5.0/95 Workbook

I have changed it to Microsoft Excel Workbook format and it worked. I am
going to test this function to ensure it keeps on working like it
should.

Thank you for your assistance

Tobie
 
Back
Top