ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do i password protect my VB Code from users (https://www.excelbanter.com/excel-programming/429045-how-do-i-password-protect-my-vbulletin-code-users.html)

Bruce

How do i password protect my VB Code from users
 
I would like to do a couple of things to hide / protect information in my
excel file (2k3).

1. How can I password protect my VBA so others cannot see or edit it?
2. I Have a worksheet with a command button that starts a macro but I want
to password protect the sheet. I have unlocked the cells that get the update,
but when I run the macro with protection on it says "You cannto use a macro
on a protected sheet". How can I get around this?

Bruce

Jacob Skaria

How do i password protect my VB Code from users
 
1. Launch VBE using Alt+F11. Check Tools VBA Project Properties Protection
Check Lock and assign password

2. I am not sure I understood your question...Using code you can unprotect
the sheet and then before End Sub you can protect the sheet again...Does that
help???

If this post helps click Yes
---------------
Jacob Skaria


"Bruce" wrote:

I would like to do a couple of things to hide / protect information in my
excel file (2k3).

1. How can I password protect my VBA so others cannot see or edit it?
2. I Have a worksheet with a command button that starts a macro but I want
to password protect the sheet. I have unlocked the cells that get the update,
but when I run the macro with protection on it says "You cannto use a macro
on a protected sheet". How can I get around this?

Bruce


Bruce

How do i password protect my VB Code from users
 
Thanks Jacob, have 1. working now and understand your point on 2. and will
work on it.

Bruice



"Jacob Skaria" wrote:

1. Launch VBE using Alt+F11. Check Tools VBA Project Properties Protection
Check Lock and assign password

2. I am not sure I understood your question...Using code you can unprotect
the sheet and then before End Sub you can protect the sheet again...Does that
help???

If this post helps click Yes
---------------
Jacob Skaria


"Bruce" wrote:

I would like to do a couple of things to hide / protect information in my
excel file (2k3).

1. How can I password protect my VBA so others cannot see or edit it?
2. I Have a worksheet with a command button that starts a macro but I want
to password protect the sheet. I have unlocked the cells that get the update,
but when I run the macro with protection on it says "You cannto use a macro
on a protected sheet". How can I get around this?

Bruce



All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com