VBA Error: Too Many Line Continuations

=========
QUESTION
———
To keep my VBA code clean, I use quite a few line continuations ( & _ ).

Recently, however, Access errored out on me with the note: Too Many Line Continuations.

Is there a way to work around this?

 

=========
ANSWER
———
Yep – just trick it by setting half your lines in one var, then the other half in another var, then set your actual var to those two vars combined (see EXAMPLES)

Note: Max line continuations is 24-25

 

=========
EXAMPLES
———
var1 = _
“this is line 1” & _
“this is line 2” & _
“all the way through line 24 or 25”

var2 = _
“this is the next line” & _
“this is the final line”

ActualVar = var1 & var2

 

=========
APPLIES TO / KEY WORDS
———
VBA
Microsoft Access
& _

 

=========
REF
———
http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/too-many-line-continuations-help-1321343

 


http://www.anysitesupport.com/vba-error-too-many-line-continuations/
http://anySiteHosting.com

By | 2011-10-31T07:18:31+00:00 October 31st, 2011|Computers, Documentation, Microsoft, VBA|0 Comments