Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Protect Worksheet Code Areas

If I protect a worksheet/workbook from having anyone make changes, does this
automatically protect the worksheet code area/s as well?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Protect Worksheet Code Areas

I'm assuming by code areas you mean VB modules containing macros. If that's
the case then protection at the level a worksheet or workbook does not have
any effect on your code.

Press Alt + F11 to open the Visual Basic Editor and locate the VBA Project
window. Normally in the upper-left corner. Locate the VBAProject icon that
has your workbook name in parenthesis and right click to open the shortcut
menu.

From the shortcut menu select VBAProject Properties and in the dialog box
that's displayed click the PROTECTION tab.

Click the LOCK PROJECT FOR VIEWING checkbox and add and confirm a password.
Click OK when done, close the Visual Basic Editor and then resave your
workbook.

The code is now password protected.
--
Kevin Backmann
Dallas, TX


"retired bill" wrote:

If I protect a worksheet/workbook from having anyone make changes, does this
automatically protect the worksheet code area/s as well?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Protect Worksheet Code Areas


Kevin, thanks for your input. shall give it a try. Thanks, Bill

"Kevin B" wrote:

I'm assuming by code areas you mean VB modules containing macros. If that's
the case then protection at the level a worksheet or workbook does not have
any effect on your code.

Press Alt + F11 to open the Visual Basic Editor and locate the VBA Project
window. Normally in the upper-left corner. Locate the VBAProject icon that
has your workbook name in parenthesis and right click to open the shortcut
menu.

From the shortcut menu select VBAProject Properties and in the dialog box
that's displayed click the PROTECTION tab.

Click the LOCK PROJECT FOR VIEWING checkbox and add and confirm a password.
Click OK when done, close the Visual Basic Editor and then resave your
workbook.

The code is now password protected.
--
Kevin Backmann
Dallas, TX


"retired bill" wrote:

If I protect a worksheet/workbook from having anyone make changes, does this
automatically protect the worksheet code area/s as well?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,600
Default Protect Worksheet Code Areas

Just to add, password protected code is notoriously weak, best to consider
as a deterrent against the casual user tampering with your code but no more.

For code in a worksheet module password protection is virtually
non-existent. All you need to do is copy the sheet to a new workbook and
open the project (might also need select a sheet that doesn't have any code
and copy the pair).

Regards,
Peter T


"Kevin B" wrote in message
...
I'm assuming by code areas you mean VB modules containing macros. If
that's
the case then protection at the level a worksheet or workbook does not
have
any effect on your code.

Press Alt + F11 to open the Visual Basic Editor and locate the VBA Project
window. Normally in the upper-left corner. Locate the VBAProject icon
that
has your workbook name in parenthesis and right click to open the shortcut
menu.

From the shortcut menu select VBAProject Properties and in the dialog box
that's displayed click the PROTECTION tab.

Click the LOCK PROJECT FOR VIEWING checkbox and add and confirm a
password.
Click OK when done, close the Visual Basic Editor and then resave your
workbook.

The code is now password protected.
--
Kevin Backmann
Dallas, TX


"retired bill" wrote:

If I protect a worksheet/workbook from having anyone make changes, does
this
automatically protect the worksheet code area/s as well?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protect VB-code mohavv Excel Discussion (Misc queries) 1 December 2nd 07 10:20 PM
Naming Areas on Worksheet (Excel 2002) Abby Excel Worksheet Functions 5 October 14th 06 08:29 PM
Protected Worksheet - tabs stop working in certain areas bucketowater Excel Discussion (Misc queries) 0 January 26th 06 05:27 AM
Code to protect sheet Conditional Formatting Excel Worksheet Functions 1 December 21st 05 11:04 PM
password protect vba code greg Excel Discussion (Misc queries) 3 December 8th 04 04:03 PM


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"