title: Hide macro from user in Excel but still call via button?
body: <p>I have a spreadsheet that will be distributed to co-workers; I want to make it as user friendly as possible so in order to run the macros I have a simple button that automates everything for them. But I don't want them to have access to running any of the macros on their own.</p>
  
  <p>I've managed to somewhat do this using </p>
  
  <pre><code>Option Private Module
  Public Sub Run_Batch_Report()
  'The actual script that works is here, cutting it to skip to the portion that won't work'
  Call Misc_Doc
  MsgBox ("Report finished.")
  End Sub
  </code></pre>
  
  <p>All that Public Sub Misc_Doc() does is import data from another spreadsheet and format it.</p>
  
  <p>And then having a Command Button calling the module via application.run</p>
  
  <pre><code>Private Sub CommandButton1_Click()
  Application.Run "Batching_Module.Run_Batch_Report"
  End Sub
  </code></pre>
  
  <p>Doing this <em>kind</em> of works; as in it seems to run the Run_Batch_Report sub just fine, but that sub also calls other subs within the same module to complete the job. Those subs will not run UNLESS I unlock the VB in developers options for viewing and editing. Is it possible to have the sub run in its entirety (including calling other subs within the same module) or would I have to restructure my sub to just include all the other subs it calls as well?</p>
  
  <p>Sorry if I worded this haphazardly - I'm actually in the middle of a meeting and juggling this while listening to the bosses.</p>
  
  <p>Edit: To clarify, I've locked the VB from being viewed. When I run the script while it's still locked, it won't allow the sub to call other portions of the module. Once my password is entered to unlock VB for viewing, it works.</p>