Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autostart macro-protect file
Hi,
I have written following code to protect my file from beeing used from people who shouldent use it. The problem I have is that you have to activate the macro when you open the file to get it started, so it don't totaly work. Do anyone know howe to solv this? Private Sub Workbook_Open() If Application.OrganizationName = "Min pc" Then MsgBox "Hej " & Application.UserName Else Application.Quit End If End Sub -- I would be wery grateful for yout help! Best regards Mia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autostart macro-protect file
The only effective way to keep people out of your workbook is to not share it
with them. Anything that depends on a macro means that macros can be disabled--and it's not too difficult to break into your code and just turn off the things that do the checking. You could give the workbook a nice password to open and only share the password with trusted co-workers, but even those can be broken. Mia wrote: Hi, I have written following code to protect my file from beeing used from people who shouldent use it. The problem I have is that you have to activate the macro when you open the file to get it started, so it don't totaly work. Do anyone know howe to solv this? Private Sub Workbook_Open() If Application.OrganizationName = "Min pc" Then MsgBox "Hej " & Application.UserName Else Application.Quit End If End Sub -- I would be wery grateful for yout help! Best regards Mia -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autostart Macro | Excel Discussion (Misc queries) | |||
Autostart | Excel Discussion (Misc queries) | |||
macro to password protect exel file | Excel Programming | |||
Trying to protect output file with Macro | Excel Programming | |||
Autostart | Excel Programming |