You can use LockXLS commands in your custom menu, or call them from your VBA code.
LockXLS allows to call these commands through it's COM object model. This sample code shows you, how to call "Save Modified Data" command from custom menu item.
RunCommand( <Command ID>, (optional)<Workbook>) method calls handler for each LockXLS menu command. Possible values for Command ID parameter:
Second parameter Workbook is used only when you are using this code inside of addin. By default LockXLS Runtime uses workbook which is currently active to add/remove activation code and perform operations with data.
Addin is never became active, so menu and tab on the ribbon will never became visible. For addin you should install your own toolbar (tab on the ribbon) and create VBA code for Enter Activation Code \ Remove Activation menu items. In this code you should use this statement:
Second parameter passes workbook object which represents your addin to the LockXLS Runtime.
Please, note, LockXLS Runtime will collect modified data only if LockXLS menu is enabled. So, if you are using Save Modified Data command from your VBA Code, or from your menu, you should call the following procedure, to enable this feature.
If LockXLS was not enabled LockXLS Runtime will start collecting data only after this call. To stop collecting data you should use LockXLS_Menu_Enable command.