Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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
Autostart Macro McCloudK Excel Discussion (Misc queries) 5 November 22nd 07 09:38 PM
Autostart Alias Excel Discussion (Misc queries) 2 December 8th 05 02:43 AM
macro to password protect exel file anelh6 Excel Programming 1 October 25th 05 01:31 AM
Trying to protect output file with Macro Vasant Nanavati Excel Programming 0 June 2nd 04 01:23 AM
Autostart syale Excel Programming 1 January 29th 04 02:07 AM


All times are GMT +1. The time now is 10:12 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"