title: Workbook Open event and detecting this event in the Worksheet code
body: <p>I am trying to cut down on some duplicate coding in a .xlsm workbook. To do this, I have created a number of subs in the "Workbook Open" area that are now called from subs within Sheet 1. (Initially there were repeated code segments in both these). This all works fine!</p>
  
  <h2>My question is this ...</h2>
  
  <p>Is it possible for code in Sheet 1 to know that it is being activated by the Workbook Open event? </p>
  
  <p>For example, I have a combo box that is populated by the Workbook_open event which then fires off the sheet 1 Combo box "Change" event. However, I only want this change event to triggered by the user once the Workbook has been opened. </p>
  
  <p>I've tried setting a global variable in Workbook Open but this only has scope within this event.</p>
  
  <p>What would be the best workaround here?</p>
  
  <p>Could I use a Workbook Module?<br>Should I write the variable to a cell in the worksheet and clear this out at the end of the event?<br>Some other solution?</p>
  
  <p>Part of the Workbook Open code ..</p>
  
  <pre><code>Private Ws_Open As Boolean
  Private Sub Workbook_Open()
  '
  ' set up drop down filter list
  '
  Range("A1").Select
  With ThisWorkbook.Worksheets(1).Cmb_filter
      .Clear
      .AddItem "None"
      .AddItem "60% or less"
      .AddItem "70% or less"
      .AddItem "80% or less"
      .AddItem "90% or less"
      .ListIndex = 0
  End With
  </code></pre>
  
  <p>Part of the Sheet 1 code ...</p>
  
  <pre><code>Private Sub Cmb_filter_Change()
   Dim intvalue As Integer
   Cmb_filter.BackColor = vbWhite
   Application.Run "'" &amp; ThisWorkbook.Name &amp; "'!Thisworkbook.clear_it"
  ..etc
  </code></pre>