View Single Post
  #37   Report Post  
Posted to microsoft.public.excel.programming
[email protected] er.hasanmj@gmail.com is offline
external usenet poster
 
Posts: 3
Default Better protection for VBA project?

On Sunday, January 17, 2010 at 11:20:40 PM UTC+5:30, Jan Karel Pieterse wrote:
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


Hi Jan/All

Also for one of my other projects I have TABLES. Is there any workaround for making this work for Workbooks with tables?? Thanks in Advance