Quote Originally Posted by vbfbryce View Post
An example:

Code:
Option Explicit

Private myCount As Integer

Private Sub Form_Load()
    myCount = myCount + 1
End Sub

Private Sub Form_Unload(Cancel As Integer)
    SaveSetting appname:="MyApp", section:="TimesLoaded", _
            Key:="MainForm", setting:=myCount
End Sub

'to retrieve the value:

GetSetting appname := "MyApp", section := "TimesLoaded", _
                       key := "Mainform", default := 0
i paste it and it's not work about getsetting where should put it i put it in the form load