Select the product you need help with
XL: How to Continue a Visual Basic Statement from One Line to the NextArticle ID: 141513 - View products that this article applies to. This article was previously published under Q141513 SUMMARY
To make Microsoft Visual Basic for Applications procedures easier to read,
you may want to continue a line of code from one line to the next. To write
code in this way, use the line-continuation character.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To continue a statement from one line to the next, type a space followed by
the line-continuation character [the underscore character on your keyboard
(_)]. In Microsoft Excel 5.0 and 7.0, you are limited to ten lines for
continuation (that is, nine line-continuation characters). In Microsoft
Excel 97 and Microsoft Excel 98, this limit is increased to 21 line-
continuation characters. You can break a line at an operator, list
separator, or period, as shown in the following statement:
PropertiesArticle ID: 141513 - Last Review: October 11, 2006 - Revision: 2.3 APPLIES TO
| Article Translations |



Back to the top








