ReplaceLine Method (VBA Add-In Object Model)

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

Replaces an existing line of code with a specified line of code.

Syntax

object**.ReplaceLine(line, code)**

The ReplaceLine 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 of the line you want to replace.

code

Required. A String containing the code you want to insert.