title: VBA excel-2010 listbox1.SelectedIndex throws error
body: <p>Hi I am inside an excel workbook and in the same worksheet I wrote VBA to delete the currently selected item from a list box but the function SelectedIndex said it is not a method of the listbox. I am not sure why this is happening since I see many examples use this. Any help would be awesome! </p>
  
  <p>Code:</p>
  
  <pre><code>ListBox1.Items.RemoveAt (ListBox1.SelectedIndex)
  </code></pre>