Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.English: This is a screenshot of the PureBasic Visual Designer, which is a FREE (not commercial) unsupported application created by PureBasic team member Berikco for the benefit of PureBasic users. Objects (Visual Basic for Applications).MyVar = "Come see me in the Immediate pane." Note that the Print method only applies to objects that can display text. Using the Print method, this example displays the value of the variable MyVar in the Immediate window. Alternatively, you can print by using a fixed-pitch font (such as Courier) to ensure that each character uses only one column. To allow for cases where wider than average characters are used, your tabular columns must be positioned far enough apart. For example, a wide letter, such as a "W", occupies more than one fixed-width column, and a narrow letter, such as an "i", occupies less. For example, an error occurs if the method is called in a standard module without specifying an object, but if called in a form module, outputlist is displayed on the form.īecause the Print method typically prints with proportionally-spaced characters, there is no correlation between the number of characters printed and the number of fixed-width columns those characters occupy. The object is required if the method is used outside a module having a default display space. The Error keyword is appropriately translated when it is output. The Null keyword is appropriately translated when it is output.įor error data, the output is written as Error errorcode. However, if outputlist data is Null, Null is output. Nothing is written if outputlist data is Empty. When either the date or the time component is missing or zero, only the data provided is written. The True and False keywords are translated according to the locale setting for the host application.ĭate data is written by using the standard short date format recognized by your system. The keywords are output in the appropriate language for the host application.įor Boolean data, either True or False is printed. Multiple expressions can be separated with either a space or a semicolon.Īll data printed to the Immediate window is properly formatted by using the decimal separator for the locale settings specified for your system. If charpos is omitted, the next character is printed on the next line. Use Tab with no argument to position the insertion point at the beginning of the next print zone. Use Tab( n) to position the insertion point at an absolute column number. Use a semicolon ( ) to position the insertion point immediately following the last character displayed. Specifies the insertion point for the next character. Numeric expression or string expression to print. Used to position the insertion point at an absolute column number where n is the column number.
Used to insert space characters in the output, where n is the number of space characters to insert. The outputlist argument has the following syntax and parts: Expression or list of expressions to print. An object expression that evaluates to an object in the Applies To list. The Print method syntax has the following object qualifier and part: Part