Too many line continuations

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

There is a limit to the number of lines you can join with line-continuation characters. This error has the following cause and solution:

  • Your code has more than 25 physical lines lines joined with line-continuation characters, or more than 24 consecutive line-continuation characters in a single line. Make some of the constituent lines physically longer to reduce the number of line-continuation characters needed, or break the construct into more than one statement.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).