You can use the registry instead since its just one propertyOf course you'll have to use more meaningful labels and values than the ones in the sample above.Code:Option Explicit 'sample has common dialog control and command button on form Private Sub Command1_Click() 'change form backcolor CommonDialog1.ShowColor Me.BackColor = CommonDialog1.Color End Sub Private Sub Form_Load() 'retrieve setting, use default value if reg key doesn't exist Me.BackColor = CLng(GetSetting("AppName", "Section", "BackColor", &H8000000F)) End Sub Private Sub Form_Unload(Cancel As Integer) 'save setting for subsequent GetSetting() SaveSetting "AppName", "Section", "BackColor", Me.BackColor End Sub




Reply With Quote