+ Reply to Thread
Results 1 to 5 of 5

Protecting VBA script (self destruct?)

  1. #1
    Registered User
    Join Date
    09-05-2017
    Location
    Paris
    MS-Off Ver
    2016
    Posts
    3

    Question Protecting VBA script (self destruct?)

    Hello community,

    I am very concerned that my excel and outlook VBA password can be hacked in about a minute just by changing DPB key with notepad. How can I add another layer of a security?

    Any chance to create a startup script like
    Please Login or Register  to view this content.
    and check for a valid DPB key and if not found then maybe re-protect the file with a new password or somehow self destruct the source file by making it corrupt? We are talking about xlsm excel files and the outlook VbaProject.OTM file.

    Keeping the file in working condition is not a concern, I always have the original copy.

    Thanks in advance!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Protecting VBA script (self destruct?)

    Hi,

    Protecting VBA with VBA is inherently flawed as a model since your protection code is as hackable as any other code. If it is truly necessary, you might consider a tool like Unviewable+ for Excel but I'm not aware of any similar program for Outlook. A COM add-in would perhaps be a better option for both.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    09-05-2017
    Location
    Paris
    MS-Off Ver
    2016
    Posts
    3

    Re: Protecting VBA script (self destruct?)

    I agree that protecting vba with vba is certainly not very secure, but on other hand most people wont be able to make a next step if changing the DPB key fails. So if the method well distributed on the net fails, they just wont be able to use my code and thats my goal.

    BTW is there an easy way to convert VBA projects to exe? Because I guess I could add all my forms and scripts into a separate exe and then control outlook as I did many scripts controlling outlook from excel. <<< could be a stupid question.

    What I am saying is do we have an IDE where I can create the same forms and scripts and control outlook from a compiled exe?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Protecting VBA script (self destruct?)

    My point is that the user would simply break/remove the protection script that is stopping their hack on the original script.

    I think only third party tools can create .exe files from workbooks. Office Developer edition used to easily allow the creation of COM add-ins but that was sadly discontinued in 2003. These days you need Visual Studio (or another compiled language tool) to create them.

  5. #5
    Registered User
    Join Date
    09-05-2017
    Location
    Paris
    MS-Off Ver
    2016
    Posts
    3

    Re: Protecting VBA script (self destruct?)

    Alright, I will try Visual Studio... I guess creating forms and stuff should be easy with that, hopefully I can reproduce everything in that environment.

    Thanks for sharing your thoughts.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Protecting cells upon data entry and not protecting the sheet.
    By Acousticlife81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2017, 10:37 AM
  2. Protecting a cell after data entry without protecting sheet
    By Acousticlife81 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2017, 12:58 PM
  3. How Creat Self Destruct Excel file
    By ajaypal.sp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2015, 12:22 PM
  4. Excel auto delete cells or self destruct
    By ryan4646 in forum Excel General
    Replies: 11
    Last Post: 12-29-2013, 03:07 PM
  5. Protecting tabs and protecting sheets
    By jimstrongy in forum Excel General
    Replies: 0
    Last Post: 01-31-2012, 11:27 AM
  6. Macro to "self-destruct"
    By Sharkey79 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-21-2011, 09:12 AM
  7. macro for self destruct
    By jwduthler in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2005, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1