Try something like thisVB Code:
Private Sub Form_Unload(Cancel As Integer) SaveSetting "MyApp", "FormName", "ListBoxName", List1.ListIndex End Sub Private Sub Form_Load() Dim LIndex As String LIndex = GetSetting("MyApp", "FormName", "ListBoxName") If LIndex <> "" Then List1.ListIndex = CInt(LIndex) End If End Sub




Reply With Quote