Just in case someone presses Cancel.Originally Posted by Argh two glass eyes
VB Code:
Private Sub Command1_Click() Dim frm As Form On Error GoTo ErrorRoutine CommonDialog1.CancelError = True CommonDialog1.ShowColor For Each frm In Forms frm.BackColor = CommonDialog1.Color Next Exit Sub ErrorRoutine: If Err.Number = 32755 Then MsgBox "You pressed Cancel rather than selecting a color" End If End Sub





Reply With Quote