XLL+ Class Library (6.3)

CXlMacros::Patterns

Equivalent to filling in the Patterns dialog

static int Patterns(
   unsigned short apattern,
   unsigned short afore,
   unsigned short aback
);

Parameters

apattern

apattern is a number corresponding to the area patterns in the Patterns tab of the Format Cells or Format Object dialog box. If an object is selected, apattern can be from 1 to 18; if a cell is selected, apattern can be from 0 to 18. If apattern is 0 and a cell is selected, Microsoft Excel applies no pattern.

afore

afore is a number from 1 to 56 corresponding to the 56 area foreground colors in the Patterns tab of the Foramt Cells dialog box. afore is ignored if it is zero.

Note the foreground color has no effect if apattern is 1 (solid).

aback

aback is a number from 1 to 56 corresponding to the 56 area foreground colors in the Patterns tab of the Foramt Cells dialog box. Afore is ignored if it is zero.

Return Value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlMacros Class | CXlMacros Methods