Secure Excel Workbook (with VBA) from reuse with different data
<p>I have created an Excel Workbook with a lot of VBA code for a customer.  The customer will provide me with data. I will import that data into the VBA laden template, Save it as an xlsm, and deliver it to the customer. I get paid by the Workbook so I need to prevent them from trying to copy new data into the existing workbook and reusing it.</p>

<p><strong>How can I <em>somehow</em> prevent the customer from reusing a workbook by just entering in new data on the main Worksheet, then saving as a new Workbook</strong>, and getting the use of the VBA code for free. (Alternately they could copy the file in windows then enter new data on the copied version.) <strong>I need to detect a <em>significant</em> change in data from the initial imported data.</strong></p>

<p>The data on the main sheet is fairly static (perhaps even totally static on many known columns). I'm thinking about randomly sampling some of the cell data on import (perhaps 10 random cells, or number of rows, etc.), and storing that data <em>somewhere</em>. If, say, 50% of the cells change data, I could just disable (or short-circuit) the public entry points in the code...or something else?</p>

<p>I'd like to allow for <em>some</em> flexibility on the part of the customer, but prevent abuse.</p>

<ul>
<li>Is there a better way than my general idea, above? </li>
<li>Where could I store that data (it should be part of the sheet, but not changeable by the customer). Perhaps a hidden sheet with password locked cells?</li>
<li>Is there some accepted way of doing this that I'm unaware of?</li>
</ul>