'View Code' Macros

Always_A_Newbie

New Member
Joined
Nov 19, 2003
Messages
28
Hi there,
I have a protected sheet set that way inside a macro, but allows the macro access, and have set the password inside the macro.
I needed to do it like this because I wanted the sheet to be protected from user input but also needed the macros to be able to alter these protected fields. Someone showed me how to do this from here, cheers.
But problem is, this sheet protection isn't really any good as if anyone wanted to do anything to the sheet they shouldn't, they just right click the green icon->view code->see the password, change the password etc.

Is there any way to password protect the 'View Code' option?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Certainly is:-

In the Visual Basic Editor click Tools, VBAProject Properties, click on the Protection tab. Just tick the Lock Project for viewing checkbox and type a password.

Next time you open your workbook your code will be protected.
 
Upvote 0
Cheers mate, such a friendly and fast forum.

Could ya help me out again, this Workbook will be run on a Network, does ticking this box effect the Excel program itself, or is it stored in the file?

In other words, can I do this once inside the sheet and save it, or do I need to go around every machine and tick this box?

Thanks again.
 
Upvote 0
Well we aim to please :)

The password protection will apply to the file. If you send it to someone else or place it on a network drive it will still be protected until someone either unlocks it with the password or hacks it.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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