SetSelection Method Example

The following example uses the SetSelection method to select the text whose first character is the one immediately after the fourth character on the second line of CodePanes(1) and whose last character is the fifteenth character on the third line.

Application.VBE.CodePanes(1).SetSelection 2,4,3,15