title: VBA - If scrollbar is changed left or right
body: <p>I have a scrollbar in a userform and I would like to run some code if it is shifted left and run some different code if it is shifted right.</p>
  
  <p>Something like this (obviously this doesn't work):</p>
  
  <pre><code>Private Sub ScrollBar1_Change()
  
  If ScrollBar1 = Left Then
  
  MsgBox "left"
  
  ElseIf ScrollBar1 = Right Then
  
  MsgBox "right"
  
  End If
  
  End Sub
  </code></pre>
  
  <p>Thank You</p>