This example changes the value of the LastChanged user setting and saves that change by calling the My.Settings.Save method.
Sub ChangeAndPersistSettings()
My.Settings.LastChanged = Today
My.Settings.Save()
End Sub
For this example to work, your application must have a LastChanged user setting, of type Date. For more information, see How to: Add or Remove Application Settings.