NamedRange.AutoFit Method (2007 System)

Changes the width of the columns or the height of the rows in the NamedRange control to achieve the best fit.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Function AutoFit As Object
'Usage
Dim instance As NamedRange 
Dim returnValue As Object 

returnValue = instance.AutoFit()
public Object AutoFit()
public:
Object^ AutoFit()
public function AutoFit() : Object

Return Value

Type: System.Object

Remarks

One unit of column width is equal to the width of one character in the Normal style.

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace