Visual Basic provides a standard registry location for storing program information for applications created in Visual Basic:<br><br>HKEY_CURRENT_USER\Software\VB and VBA Program Settings\appname\section\key<br><br>Visual Basic also provides four statements and functions to manipulate the settings stored in your application's registry location.<br><br>Function or Statement Description <br>GetSetting function Retrieves registry settings. <br>SaveSetting statement Saves or creates registry settings. <br>GetAllSettings function Returns an array containing multiple registry settings. <br>DeleteSetting statement Deletes registry settings. <br><br><br>Note To view registry entries, use the Regedit application, included with Windows 95 and Windows NT.<br><br><br>----------------------------------------<br>Creating or Saving Application Settings<br><br><br>You can use the SaveSetting statement to save a new value for a registry key stored in your application's registry location. For example, you could add code to the Form_Unload event in the application's main form in order to preserve settings at shutdown, or in the Form_Unload event on an Options dialog box to update user preferences.<br><br>Use the following syntax for the SaveSetting statement:<br><br>SaveSetting appname, section, key, value<br><br>The following code saves new values for the Backup and LastEntry keys in the Startup section of the registry for an application named "RegCust." This code assumes that the variables strDate and intLastEntry contain the new values.<br><br>Private Sub Form_Unload(Cancel As Integer) <br> SaveSetting "RegCust", "Startup", "Backup", strDate<br> SaveSetting "RegCust", "Startup", "LastEntry", _<br> intLastEntry<br>End Sub<br><br>If an entry for the application "RegCust" or any of these sections or keys don't exist in the Software/Microsoft section in the registry, this code will create it.<br><br>-------------------- <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.