XLL+ Class Library

CXlMacros::Alignment

Aligns the contents of the selected cells

[C++]
static int Alignment(
   unsigned short horiz_align = 0,
   short int wrap = -1,
   short int vert_align = 0,
   short int orientation = -1
);

Parameters

horiz_align

Horiz_align is a number from 1 to 7 specifying the type of horizontal alignment. A value of 0 is treated as a missing argument.

wrap

Wrap corresponds to the Wrap Text check box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.

vert_align

Vert_align is a number from 1 to 4 specifying the vertical alignment of the text. A value of 0 is treated as a missing argument, A value greater than 0 is treated normally.

orientation

Orientation is a number from 0 to 4 specifying the orientation of the text. A value of -1 is treated as a missing argument, A value greater than or equal to 0 is treated normally.

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