Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 17th 10, 06:33 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2005
Posts: 36
Default Better protection for VBA project?

Hi All,

(I'm not a VBA pro, more of an enhusiastic amateur)


Is it possible to better protect a VBA project?

I wrote a simple trading sheet for a guy recently
and I put a bit of code in to disable the sheet after
a day or two until he paid me.

What he did though was ask about on a few forums
and got info on how to easily crack a VBA project security.

I tried it and it was alarmingy easy.

He got hold of a Hex editor and created a VBA project with
an easily recognisable password, say DOGBONE for example.

He then found where excel stored this password via the
hex editor, opened my sheet and with the hex editor replaced
my password with the simple one.

Lo and behold he had cracked my VBA project security in about
5 minutes.

Is there a better more secure way to protect a VBA project?


Ron

  #2   Report Post  
Old January 17th 10, 06:50 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2006
Posts: 535
Default Better protection for VBA project?

Hi Ron,

Is there a better more secure way to protect a VBA project?


Yes there is (misplaced the link to this one):

1. Save the Excel workbook (.xls) file into an add-in (File SaveAs.....)
2. After you have the saved add-in (.xla), close the Excel workbook (.xls)
3. Double click on the add-in to open it
4. Press Alt+F11 to access the add-in's vba project
5. Lock the vba-project with a password
6. Double-click on the "ThisWorkbook" code module
7. Press F4 to open the Properties window
8. Change the "IsAddin" status to FALSE
9. Return to Excel by Pressing Alt+Q (or close the vbe window)
10. Go to Tools Share Workbook
11. When the dialogue appears, check the box for: (Allow changes by.....)
12. Press OK to close the Dialogue
13. When prompted to save, Press OK
14. Press Ok to accept that "macros cannot be accessed"
15. You should feel giddy at this point because you just realized what you have
been missing right under your nose
16. Verify that the [SHARED] appears in the application title bar
17. Now save the workbook again as an Add-in (File SaveAs...) overwriting the
previous one
18. Close this Excel workbook without saving the changes (you don't need it)
19. Test out your newly saved add-in (open it, access the vbe, try to expand
the project window, you should get the new message "Project is Unviewable"
20. Your done

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #3   Report Post  
Old January 17th 10, 07:10 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2005
Posts: 36
Default Better protection for VBA project?

Thanks,

It never ceases to amaze me how many good people are hanging around this
place with rapid response answers.

Thanks again, I will try it out.

Ron

  #4   Report Post  
Old February 19th 10, 12:51 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2010
Posts: 1
Default Better protection for VBA project?

On Jan 17, 5:50*pm, Jan Karel Pieterse
wrote:
Hi Ron,

Is there a better more secure way toprotectaVBAproject?


Yes there is (misplaced the link to this one):

....
10. Go to Tools Share Workbook

....
14. Press Ok to accept that "macros cannot be accessed"
Regards,

Jan Karel Pieterse
Excel MVPhttp://www.jkp-ads.com


Jan, my spreadsheet uses XML data, so when I follow this procedure I
get an error at step 10 saying "This workbook cannot be shared because
it contains Excel tables or XML maps...". Is there any way of
protecting my VBA?



  #5   Report Post  
Old February 22nd 10, 04:31 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2006
Posts: 535
Default Better protection for VBA project?

Hi Brendanh,

Jan, my spreadsheet uses XML data, so when I follow this procedure I
get an error at step 10 saying "This workbook cannot be shared because
it contains Excel tables or XML maps...". Is there any way of
protecting my VBA?


Looks like you can't, I'm sorry!

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com



  #6   Report Post  
Old April 8th 10, 08:42 PM posted to microsoft.public.excel.programming
JA JA is offline
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2007
Posts: 13
Default Better protection for VBA project?

I got this to work once. Later when I updated the file, I got a message that
this was not a valid add-in? Thoughts? Thanks!
  #7   Report Post  
Old February 6th 15, 12:52 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2015
Posts: 1
Default Better protection for VBA project?

Hi Karel

Does it works also with office 2010,
becouse I follow all the steps but it does't work :-(

Thank you in advanced
Carlo
  #8   Report Post  
Old February 18th 15, 05:12 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2015
Posts: 2
Default Better protection for VBA project?

I can't get it to work with Excel 2007 or 2013 either. I wonder if there was a patch in the last round of MS Office Updates?
  #9   Report Post  
Old February 18th 15, 05:34 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2011
Posts: 3,514
Default Better protection for VBA project?

Hi Karel

Does it works also with office 2010,
becouse I follow all the steps but it does't work :-(

Thank you in advanced
Carlo


Best solution for the buck, IMO, I've ever found...

http://dombajsoft.com/protectvba.htm

...where it generates a protected copy for distributing and lets you
work with the original version in the normal fashion!

Displays "Project is unviewable" same as JKP's solution does, but not
'undoable' like JKP's is.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #10   Report Post  
Old February 18th 15, 07:07 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2015
Posts: 2
Default Better protection for VBA project?

Unfortunately, I'll have to wait until I get home to look at it. My Work blocked that page.

However, using the code equivalent of JKP's solution I was able to get it to work (on 2007, haven't tried 2013):

Workbooks("test.xla").SaveAs "c:\test.xla", AccessMode:=xlShared


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
VBE Project Protection Nigel RS[_2_] Excel Programming 1 May 9th 07 01:45 PM
Protection property of the VBA project helmekki[_89_] Excel Programming 3 August 10th 05 01:18 AM
VB Project Protection [email protected] Excel Programming 1 July 11th 05 02:42 PM
Project Protection Don Lloyd Excel Programming 2 February 15th 05 01:45 PM
VB project protection Frank C. Excel Programming 2 January 12th 04 03:29 PM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017