Converting VBA modules to add-ins?

Kelvin Stott

Active Member
Joined
Oct 26, 2010
Messages
330
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.
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Kelvin Stott

Active Member
Joined
Oct 26, 2010
Messages
330
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! :)
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,324
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,019
Messages
5,545,532
Members
410,690
Latest member
navneetr
Top