title: How to exclude particular worksheet names from looping?
body: <p>I have a scenario where I have an Excel workbook in whiche are multiple worksheets.</p>
  
  <p>For example:</p>
  
  <pre><code>Main 
  Sheet1 
  Sheet2
  Sheet3
  Sheet4
  Sheet5
  Sheet6
  .
  .
  .
  And so on 
  </code></pre>
  
  <p>In Combobox I want to display all worksheet names except these sheet names: <code>Main</code>, <code>Sheet3</code>, <code>Sheet5</code></p>
  
  <p>Means my combobox should have only below sheet name </p>
  
  <pre><code>Sheet1 
  Sheet2
  sheet4
  sheet6
  … and so on 
  </code></pre>
  
  <p>I have a code which works when I mention only one sheet name: "Main" to be excluded.</p>
  
  <pre><code>Private Sub UserForm_Initialize()      
      Dim ws As Worksheet
      For Each ws In Worksheets
          If ws.Name &lt;&gt; "Main" Then
              Me.ComboBox1.AddItem ws.Name
          End If
      Next ws
  End Sub
  </code></pre>
  
  <p>When I modified and added multiple sheet name code does not work display all sheet names.</p>
  
  <pre><code>Private Sub UserForm_Initialize()
      Dim ws As Worksheet
      For Each ws In Worksheets
          If ws.Name &lt;&gt; "Main , Sheet 3, Sheet 5" Then
              Me.ComboBoxpgname.AddItem ws.Name
          End If
      Next ws
  End Sub
  </code></pre>