Transcript
  • 7/21/2019 Source Code Save & Get Settings

    1/1

    ' Save text1's valueSaveSetting App.EXEName, "textboxes", "text1", text1.Text

    ' Get text1's valuetext1.text = GetSetting (App.EXEName, "textboxes", "text1", "")

    SaveSetting stores the data in the Registry (in HKEY_CURRENT_USER|Software|VB an

    d VBA Program Settings|YourAppName). The four parts of the function are the nameunder which it is stored (App.EXEName in this case), "textboxes" in this example is like the section name in an ini file, "text1" is like the key in a line ofdata in the ini file, and text1.text is the value.

    GetSetting returns the value. The 4th parameter ("" in this case) is optional and it is the default if no registry entry is found.__________________


Top Related