API Documentation > CorelDRAW > 2025-v26 > Color > IVGColor
Color.UserAssign method
Brings up the Color dialog to allow the user to assign a color
Syntax:
Sub UserAssign(Optional ByVal ParentWindowHandle As Long = 0)
Parameters:
Name Type Description
ParentWindowHandle
Long
Remarks:
The UserAssign method displays the Color dialog box, allowing the user to assign a color. The chosen color is applied to the color object. 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 creates a new color object, then shows the color dialog and prompts the user to select a color. The color is then applied to all of the object fills in the selection.
Sub Test()
Dim c As New color
Dim s As Shape
c.UserAssign
For Each s In ActiveSelection.Shapes
  s.Fill.ApplyUniformFill c
Next s 
End Sub