Converting VBA modules to add-ins?

Kelvin Stott

Active Member
Joined
Oct 26, 2010
Messages
338
Hello, I have developed an integrated Excel-VBA workbook (XLSM file) and would like to protect the VBA code beyond simple password protection. I have read that converting it to an add-in would make it more secure, but I have looked around and can't figure out how to do this. The workbook (XLSM file) includes the following elements:
  1. Several complex worksheets with user-defined functions coded in VBA
  2. A VBA project with the following elements:
    1. A single VBA module which codes all my macros and user-defined functions for the workbook
    2. Event handlers in the VBA workbook object, which call various named macros defined in the VBA module
    3. Three different user forms, which also call various named macros defined in the VBA module
So my question is how to follow the advice and convert the workbook to an add-in so that it is more secure. Could I just save the entire XLSM file as an XLAM file? Would this really be more secure, and would it keep the current worksheet structure and integrity of the VBA project? Or would I have to convert individual modules or elements of the VBA project into separate add-ins, and how would I do this while retaining the integrity of the workbook?

I'm afraid I really don't understand the difference between a VBA project within an XLSM file, and an add-in within an XLAM file.

Thanks for any help and guidance here.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Perfect, thank you, Joe. I'm fairly proficient creating VBA scripts within normal xlsm workbooks (thanks also to John W), but no experience at all creating or using add-ins, so I feel the "dummies" reference is entirely appropriate. :)

Thanks again! :)
 
Upvote 0
Perfect, thank you, Joe. I'm fairly proficient creating VBA scripts within normal xlsm workbooks (thanks also to John W), but no experience at all creating or using add-ins, so I feel the "dummies" reference is entirely appropriate. :)

Thanks again! :)
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top