Vertical Entries for VBA.Array

  • Thread starter Thread starter cogent
  • Start date Start date
C

cogent

Hello

I am populating an array and to do so, the listings go WAY across the page
horizontally:

vaCriterion = VBA.Array("_5d_LB_True_DR", "_10d_LB_True_DR",
"_20d_LB_True_DR", "_30d_LB_True_DR", "_60d_LB_True_DR", "_110d_LB_True_DR",
"_120d_LB_True_DR", "_150d_LB_True_DR", "_5d_LB_ADF", "_5d_LB_beta",
"_5d_LB_DR_IR", "_5d_LB_DR_sd", "_10d_LB_ADF", "_10d_LB_beta",
"_10d_LB_DR_IR", "_10d_LB_DR_sd", "_20d_LB_ADF", "_20d_LB_beta",
"_20d_LB_DR_IR", "_20d_LB_DR_sd", "_30d_LB_ADF", "_30d_LB_beta",
"_30d_LB_DR_IR", "_30d_LB_DR_sd", "_60d_LB_ADF", "_60d_LB_beta",
"_60d_LB_DR_IR", "_60d_LB_DR_sd", "_110d_LB_ADF", "_110d_LB_beta",
"_110d_LB_DR_IR", "_110d_LB_DR_sd", "_120d_LB_ADF", "_120d_LB_beta",
"_120d_LB_DR_IR", "_120d_LB_DR_sd", "_140d_LB_ADF", "_150d_LB_ADF",
"_150d_LB_beta", "_150d_LB_DR_IR", "_150d_LB_DR_sd")

How can i get Excel VBA to let me make the entries vertically so that they
are not out of the scope of the window. All the refernce books show it
vertically but they do not say how to accomplish it.

Tha nk you
 
Use the line continuation character "_"

vaCriterion = VBA.Array("_5d_LB_True_DR", _
"_10d_LB_True_DR", "_20d_LB_True_DR", _
"_30d_LB_True_DR",

I think the max limit is 24.
 
In VB statements, you can break a long line of code by placing an underscore at the position your want to break the line

vaCriterion = Array("_5d_LB_True_DR", "_10d_LB_True_DR", "_20d_LB_True_DR",
"_30d_LB_True_DR", "_60d_LB_True_DR", "_110d_LB_True_DR", "_120d_LB_True_DR",
"_150d_LB_True_DR", "_5d_LB_ADF", "_5d_LB_beta", "_5d_LB_DR_IR", "_5d_LB_DR_sd",
"_10d_LB_ADF", "_10d_LB_beta", "_10d_LB_DR_IR", "_10d_LB_DR_sd", "_20d_LB_ADF",
"_20d_LB_beta", "_20d_LB_DR_IR", "_20d_LB_DR_sd", "_30d_LB_ADF", "_30d_LB_beta",
"_30d_LB_DR_IR", "_30d_LB_DR_sd", "_60d_LB_ADF", "_60d_LB_beta", "_60d_LB_DR_IR",
"_60d_LB_DR_sd", "_110d_LB_ADF", "_110d_LB_beta", "_110d_LB_DR_IR", "_110d_LB_DR_sd",
"_120d_LB_ADF", "_120d_LB_beta", "_120d_LB_DR_IR", "_120d_LB_DR_sd", "_140d_LB_ADF",
"_150d_LB_ADF", "_150d_LB_beta", "_150d_LB_DR_IR", "_150d_LB_DR_sd"

Regards
Edwin Ta
(e-mail address removed)
http://www.vonixx.co

----- cogent wrote: ----

Hell

I am populating an array and to do so, the listings go WAY across the pag
horizontally

vaCriterion = VBA.Array("_5d_LB_True_DR", "_10d_LB_True_DR"
"_20d_LB_True_DR", "_30d_LB_True_DR", "_60d_LB_True_DR", "_110d_LB_True_DR"
"_120d_LB_True_DR", "_150d_LB_True_DR", "_5d_LB_ADF", "_5d_LB_beta"
"_5d_LB_DR_IR", "_5d_LB_DR_sd", "_10d_LB_ADF", "_10d_LB_beta"
"_10d_LB_DR_IR", "_10d_LB_DR_sd", "_20d_LB_ADF", "_20d_LB_beta"
"_20d_LB_DR_IR", "_20d_LB_DR_sd", "_30d_LB_ADF", "_30d_LB_beta"
"_30d_LB_DR_IR", "_30d_LB_DR_sd", "_60d_LB_ADF", "_60d_LB_beta"
"_60d_LB_DR_IR", "_60d_LB_DR_sd", "_110d_LB_ADF", "_110d_LB_beta"
"_110d_LB_DR_IR", "_110d_LB_DR_sd", "_120d_LB_ADF", "_120d_LB_beta"
"_120d_LB_DR_IR", "_120d_LB_DR_sd", "_140d_LB_ADF", "_150d_LB_ADF"
"_150d_LB_beta", "_150d_LB_DR_IR", "_150d_LB_DR_sd"

How can i get Excel VBA to let me make the entries vertically so that the
are not out of the scope of the window. All the refernce books show i
vertically but they do not say how to accomplish it

Tha nk yo
 
I see.

I was missing the quotation mark at the beginning of the new line.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top