title: Worksheet SelectionChange event from a module
body: <p>I am looking to use worksheet SelectionChange on multiple sheets.</p>
  
  <p>Here is code I have to be run using the event:</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal cell_sel As Range)
  
  Cells.Interior.ColorIndex = xlColorIndexNone
  cell_sel.Interior.ColorIndex = xlColorIndexNone
  cell_sel.Offset(1, 0).Interior.ColorIndex = 40
  cell_sel.Offset(-1, 0).Interior.ColorIndex = 40
  cell_sel.Offset(0, 1).Interior.ColorIndex = 40
  cell_sel.Offset(0, -1).Interior.ColorIndex = 40
  </code></pre>
  
  <p>It works in a worksheet (obviously). </p>
  
  <p>I would like to use this code, or any other, on ANY of the sheets as long as specific "macro toggle" is toggled/run.</p>
  
  <p>There is article after article saying it is not possible, but I have been thinking about a potential solution:</p>
  
  <p><strong><em>Creating a macro stored in a module, which would write the procedure above into active worksheet when run/toggled, and clear the worksheet when run/toggled again.</em></strong></p>
  
  <p>Is it even possible with VBA and Excel?</p>