title: how to add a drop down list in excel using vbs
body: <p>Hi I am trying to add a drop down in a excel using vbs and i am getting the below error.</p>
  
  <pre><code>vbs(18, 15) Microsoft VBScript compilation error: Syntax error
  </code></pre>
  
  <p>I even recorded a marco and used the code from there still it didn't work.</p>
  
  <p>Line 18 and col 15 is the line with the add keyword.</p>
  
  <pre><code>Range("A1").Select
      With Selection.Validation
          .Delete
          .Add (Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
          xlBetween, Formula1:="=$Q$9:$Q$11")
          .IgnoreBlank = True
          .InCellDropdown = True
          .InputTitle = ""
          .ErrorTitle = ""
          .InputMessage = ""
          .ErrorMessage = ""
          .ShowInput = True
          .ShowError = True
      End With
  </code></pre>
  
  <p>Q9:Q11 has a sample data set
  What am i doing wrong?</p>