Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have 2 questions:
How do I place a password (Message Box) to protect code from being executed (Assigned to a button command)? How can I prevent the user from accessing the sheet tabs (by using the "Options" feature also)? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
1. Protecting your macro execution: One way: - put the following code at the beginning of your macro: sub foo() Dim ret_pwd ret_pwd = Application.inputbox("please enter your password") if ret_pwd <"your_password" then msgbox "PWD was invalid" exit sub end if 'now your code follows end sub Note: This is not bullet proof. You also may protect your VBA code to make it a little bit more difficult to read the password in your code 2. Not sure what you mean with this? You may hide the sheets and the tabs and protect your workbook ('Tools - Protection') -- Regards Frank Kabel Frankfurt, Germany novice wrote: Have 2 questions: How do I place a password (Message Box) to protect code from being executed (Assigned to a button command)? How can I prevent the user from accessing the sheet tabs (by using the "Options" feature also)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|