API Documentation > CorelDRAW > 2025-v26 > Color > IVGColor
Color.UserAssignEx method
Brings up the Color dialog to allow the user to assign a color
Syntax:
Function UserAssignEx(Optional ByVal ParentWindowHandle As Long = 0) As Boolean
Parameters:
Name Type Description
ParentWindowHandle
Long
Remarks:
The UserAssignEx method displays the Select Color dialog box, allowing the user to select a color. The chosen color is applied to the color object. UserAssignEx returns True if the color dialog was closed by clicking OK. It returns False if the dialog was canceled by pressing the Cancel or the Esc key. A color is an effect applied to an object that alters the object's appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes.
Examples:
The following VBA example displays the Select Color dialog box. If the user does not select a color, the color is set to blue.
Sub Test()
Dim cColor As New Color
If cColor.UserAssignEx = False Then 'User closed the dialog without selecting a color
  Set cColor = CreateRGBColor(0, 0, 255)
End If 
End Sub