S
Senad
How Can I loop through the array, gradually buildin
up delimited list by concatenating each used element in turn to
string variable
If you want to know more details why do I ask above see below.
Thanks,
Sena
Try something like this
MsgBox "Message needs to be sent to: " & Join(strRecTo, ", "
If you have empty entries at the end of the array, though, you may en
up with trailing commas; e.g.
Message needs to be sent to: this, that, the other, , ,
To avoid that, I think you'd need to use a dynamic array and use Redi
Preserve after filling it, to give it the exact number of elements tha
you are actually using. If that's too much trouble, you could of cours
forget using Join() and just loop through the array, gradually buildin
up your delimited list by concatenating each used element in turn to
string variable
up delimited list by concatenating each used element in turn to
string variable
If you want to know more details why do I ask above see below.
Thanks,
Sena
Senad said:I have data in array strRecTo (14) whre data is collected usin
several IF....Then...Els
I would like to pass this data to Message Box, just I do not know how
the simple code looks like
Dim Counter as Intege
Counter =
While Counter <=1
If (condition) the
strRecTo (0, 1) = "something 1
Els
Counter = Counter +
If (condition) the
strRecTo (13) = "something 13
Els
Counter = Counter +
Wen
MsgBox ("Message needs to be send to: AND NOW i WOULD LIKE TO HAV
DISPLAYED MY ARRAY SEPARATED WITH COMAS OR COLUMN) Thanks in Advanc
Sena
Try something like this
MsgBox "Message needs to be sent to: " & Join(strRecTo, ", "
If you have empty entries at the end of the array, though, you may en
up with trailing commas; e.g.
Message needs to be sent to: this, that, the other, , ,
To avoid that, I think you'd need to use a dynamic array and use Redi
Preserve after filling it, to give it the exact number of elements tha
you are actually using. If that's too much trouble, you could of cours
forget using Join() and just loop through the array, gradually buildin
up your delimited list by concatenating each used element in turn to
string variable