Lock VBA code from Viewing

hernandj

Board Regular
Joined
Aug 19, 2004
Messages
60
I am trying to lock my VBA code from viewing and changing. I also have an autosave routine that saves the workbook after the user exits. Apparently, they conflict with each other because If I lock the code, the autosave does not work. I get an error message saying that the file can not be saved.

Is there any other way to lock the VBA Code?

Thanks in advance for your consideration.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Thanks for the response. That is the procedure I used and it works. The problem is that it conflicts with a autosave routine that is part of the VBA. When the autosave procedure runs, it can not save the backup copy. The autosave saves a copy of the workbook for the user in a folder called ExcelBackup. This is in addition to the original workbook.

I was hoping that there would be a way for me to accomplish both missions.

Thanks again for the effort
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,699
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top