InsertLines method (VBA Add-In Object Model)
Inserts a line or lines of code at a specified location in a block of code.
Syntax
object.InsertLines (line, code)
The InsertLines syntax has these parts:
Part | Description |
---|---|
object | Required. An object expression that evaluates to an object in the Applies To list. |
line | Required. A Long specifying the location at which you want to insert the code. |
code | Required. A String containing the code you want to insert. |
Remarks
If the text you insert by using the InsertLines method is carriage return-linefeed delimited, it will be inserted as consecutive lines.
See also
- Collections (Visual Basic Add-In Model)
- Visual Basic Add-in Model reference
- Visual Basic language reference
Support and feedback
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.