XLL+ Class Library (6.3)

CXlMacros::ColumnWidth

Changes the width of the columns in the specified reference

static int ColumnWidth(
   double width_num,
   const CXlOper& reference = CXlOper::MissingArg(),
   bool standard = false,
   unsigned short type_num = 0,
   double standard_num = 0.0
);

Parameters

width_num

Width_num specifies how wide you want the columns to be in units of one character of the font corresponding to the Normal cell style.

reference

Reference specifies the columns for which you want to change the width.

standard

Standard is a logical value corresponding to the Standard Width command from the Column submenu on the Format menu.

type_num

Type_num is a number from 1 to 3 corresponding to the Hide, Unhide, or AutoFit Selection commands. Zero is treated as a missing argument.

standard_num

Standard_num specifies how wide the standard width is, and is measured in points. Zero is treated as a missing argument.

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