Export (0) Print
Expand All
Expand Minimize

Range.Characters Property

Office 2007
Returns a Characters object that represents a range of characters within the object text. You can use the Characters object to format characters within a text string.

Syntax

expression.Characters(Start, Length)

expression   A variable that represents a Range object.

Parameters

NameRequired/OptionalData TypeDescription
StartOptionalVariantThe first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.
LengthOptionalVariantThe number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

Remarks

The Characters object isn't a collection.

Example
This example formats the third character in cell A1 on Sheet1 as bold.

Visual Basic for Applications
With Worksheets("Sheet1").Range("A1")
    .Value = "abcdefg"
    .Characters(3, 1).Font.Bold = True
End With



Community Additions

ADD
Show:
© 2015 Microsoft