设置ListBox1.ItemIndex的值就可以了。
ListBox1.Items[ListBox1.ItemIndex]只可能在ListBox1.ItemInde=-1,就是没有选中时出错,不过设置了ListBox1.ItemIndex的值以后ListBox1有时也还有可能未被选中(属于用户操作)你还是加个判断吧,这样最保险。