Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
I'm very new to macros and am using Excel 2003. I have written a macro to
protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
1.- Go to the visual basic editor.
2.- To the left theres a list in Bold "VBA Project (name of your workbook), right click it 3.- Choose VBA Projet properties 4.- Click the Protection Option 5.- Enable "Lock Project from Viewing" and put some password on it Thats it, next time you enter you wont be able to view your macros without the password "Charlene" wrote: I'm very new to macros and am using Excel 2003. I have written a macro to protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
Thank-you but I am not too worried about people being able to view the
properties of a macro, I am worried about people running the macro. The steps per your instructions disable anybody from viewing the properties of a macro which is great but the option to run the macro is still there and when I tried to run it I was able to run it without having to enter that password that I used for protecting the properties of it. Is there a way so that when you click on run that it asks for a password before running it? "Jens Palacios Neffke" wrote: 1.- Go to the visual basic editor. 2.- To the left theres a list in Bold "VBA Project (name of your workbook), right click it 3.- Choose VBA Projet properties 4.- Click the Protection Option 5.- Enable "Lock Project from Viewing" and put some password on it Thats it, next time you enter you wont be able to view your macros without the password "Charlene" wrote: I'm very new to macros and am using Excel 2003. I have written a macro to protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
Charlene, here is one way,
Sub PassWord_To_Run() 'must lock VBA project so you can't see the password in it Dim MyStr1 As String, MyStr2 As String With ActiveSheet MyStr2 = ("123") 'This is the password and it is CASE sensitive MyStr1 = InputBox("Password Is Required To Run this Macro ") If MyStr1 = MyStr2 Then 'your code here Else MsgBox ("Access Denied") End If End With End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Charlene" wrote in message ... Thank-you but I am not too worried about people being able to view the properties of a macro, I am worried about people running the macro. The steps per your instructions disable anybody from viewing the properties of a macro which is great but the option to run the macro is still there and when I tried to run it I was able to run it without having to enter that password that I used for protecting the properties of it. Is there a way so that when you click on run that it asks for a password before running it? "Jens Palacios Neffke" wrote: 1.- Go to the visual basic editor. 2.- To the left theres a list in Bold "VBA Project (name of your workbook), right click it 3.- Choose VBA Projet properties 4.- Click the Protection Option 5.- Enable "Lock Project from Viewing" and put some password on it Thats it, next time you enter you wont be able to view your macros without the password "Charlene" wrote: I'm very new to macros and am using Excel 2003. I have written a macro to protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
Or write the code in a Private Sub. It can then only be run from the VBE.
HTH Roger Shaftesbury (UK) "Charlene" wrote in message ... Thank-you but I am not too worried about people being able to view the properties of a macro, I am worried about people running the macro. The steps per your instructions disable anybody from viewing the properties of a macro which is great but the option to run the macro is still there and when I tried to run it I was able to run it without having to enter that password that I used for protecting the properties of it. Is there a way so that when you click on run that it asks for a password before running it? "Jens Palacios Neffke" wrote: 1.- Go to the visual basic editor. 2.- To the left theres a list in Bold "VBA Project (name of your workbook), right click it 3.- Choose VBA Projet properties 4.- Click the Protection Option 5.- Enable "Lock Project from Viewing" and put some password on it Thats it, next time you enter you wont be able to view your macros without the password "Charlene" wrote: I'm very new to macros and am using Excel 2003. I have written a macro to protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
permissions for running macros
A Private Sub will not show in ToolsMacroMacros but can be run just by typing
the name in and "Run" Assuming the user knows the macro name, of course. Gord Dibben MS Excel MVP On Wed, 18 Apr 2007 18:20:11 +0100, "Roger Whitehead" wrote: Or write the code in a Private Sub. It can then only be run from the VBE. HTH Roger Shaftesbury (UK) "Charlene" wrote in message ... Thank-you but I am not too worried about people being able to view the properties of a macro, I am worried about people running the macro. The steps per your instructions disable anybody from viewing the properties of a macro which is great but the option to run the macro is still there and when I tried to run it I was able to run it without having to enter that password that I used for protecting the properties of it. Is there a way so that when you click on run that it asks for a password before running it? "Jens Palacios Neffke" wrote: 1.- Go to the visual basic editor. 2.- To the left theres a list in Bold "VBA Project (name of your workbook), right click it 3.- Choose VBA Projet properties 4.- Click the Protection Option 5.- Enable "Lock Project from Viewing" and put some password on it Thats it, next time you enter you wont be able to view your macros without the password "Charlene" wrote: I'm very new to macros and am using Excel 2003. I have written a macro to protect only certain worksheets within my workbook, however I do not want everybody being able to run this macro. How do I put security on this macro so only certain individuals have the ability to execute it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running Macros | Links and Linking in Excel | |||
Running Macros | Excel Discussion (Misc queries) | |||
Running Macros | Excel Worksheet Functions | |||
Running Macros when on the LAN | Excel Discussion (Misc queries) | |||
Running Macros | Setting up and Configuration of Excel |