'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?
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
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.
 

Always_A_Newbie

New Member
Joined
Nov 19, 2003
Messages
28
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.
 

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,600
Messages
5,597,114
Members
414,125
Latest member
iQQ

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
Top