How should I define large strings in VBA? Is there a better way than coding something like the below?
Dim largeString as String
largeString = \"This is a lon
Another way is to store the text in comments, then parse it in a function. No external files required, good readability.
' TEXT to retrieve:
' SELECT
' field1, field2
' FROM table1
Function SQL_in_comments()
SQL_in_comments = Replace(Replace(Application.VBE.ActiveCodePane.CodeModule.Lines(2, 3), "' ", ""), "'", "")
End Function