Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Protecting a VBA project

Excel 2007 is turning out to be a pain in the neck, at least where the new
file formats are concerned. Users keep on saving the files in xlsx format
even though the files concerned contain macros. There have been indications
that Excel may be selecting this format by default, but we have not yet
determined the reason why this is happening.

In any case, one possible option I'd like to offer to users is a tool that
will re-import code back into the file and then protect the project. I
realise that the password protection is weak, but this is more to do with
stopping everyday users mucking about with aspects of the file that they
should be leaving alone than protecting any intellectual property.

Is programmatically protecting a VBA project possible from within either
Excel or an external application? If so how I would I go about doing so?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Protecting a VBA project

I've done some work with an app that does the following

- Open the project with known password
- Add a new password or change a password and lock
- Remove password entirely and unlock a project

It can process multiple files as a batch process, eg open locked project,
amend code, and save.

It doesn't use SendKeys though it does use API methods to read and write to
the various project properties dialogs (which do not need to be visible or
'on top' unlike SendKeys equivalent). Files are opened and processed in an
automated instance.

This has been in "occasional" development for quite a while, seems to work
quite well, at least until I change something!. It's too much to post but if
interested I'll forward.

Regards,
Peter T

"PatrickS" <msdn_newsgroups001@_removetextplusunderscores_seu rre.com. wrote
in message ...
Excel 2007 is turning out to be a pain in the neck, at least where the new
file formats are concerned. Users keep on saving the files in xlsx format
even though the files concerned contain macros. There have been
indications
that Excel may be selecting this format by default, but we have not yet
determined the reason why this is happening.

In any case, one possible option I'd like to offer to users is a tool that
will re-import code back into the file and then protect the project. I
realise that the password protection is weak, but this is more to do with
stopping everyday users mucking about with aspects of the file that they
should be leaving alone than protecting any intellectual property.

Is programmatically protecting a VBA project possible from within either
Excel or an external application? If so how I would I go about doing so?





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
project protecting Stefi Excel Programming 4 December 5th 07 01:44 PM
Protecting my project Brian Matlack[_48_] Excel Programming 2 January 17th 06 10:13 PM
Protecting VBA Project ads Excel Programming 2 July 12th 04 10:50 AM
Protecting a VBA project Ekta Singh Excel Programming 1 July 10th 03 03:54 AM
Protecting a VBA project Bob Phillips[_5_] Excel Programming 0 July 9th 03 07:24 AM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"