Width # Statement

Syntax

VBA.Width filenumber, width

filenumber

Use: Required

Data Type: Integer

Any valid file number used in the Open statement.

width

Use: Required

Data Type: Numeric

A number between 0 and 255. Implemented as the Width statement until VB3, Width is now implemented as a hidden procedure in the VBA library module.

Description

Specifies a virtual file width when working with files opened with the Open statement.

Rules at a Glance

  • width defines the number of characters that can be placed on a single output line.

  • The default width of denotes that there isn't a limit to the number of characters that can be placed on a single output line.

See Also

Input # Statement, Open Statement, Print # Statement, Write # Statement

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.