KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 long block of text that I want to fill " & _ "into a form field. I need to make sure I pay attention " & _ "to spacing and carriage return issues while doing so. " & _ "I also have to use quotes liberally, the concatenation " & _ "operator, and the continuance underscore to make sure " & _ "VBA can parse my code." & vbCr & vbCr & _ "It's kind of a pain in the ass and I wish I could use " & _ "a heredoc instead, letting me copy and paste the block" & _ "of text I need from another source and shove it into " & _ "a string." Edit: Ugh, and there's a 25 line continuation limit too? So much for nice indenting and 80 characters of width, that only gives me enough room for a couple decent paragraphs.
Tags (comma-separated)
Save Edits
Cancel