'==============================================================
'Join Sample '
'==============================================================
'Description Returns a string created by joining a number
' of substrings contained in an array.
'Syntax Join(list[, delimiter])
' Part Description
' ===============================================
' List Required. One-dimensional array
' containing substrings to be joined.
' delimiter Optional. String character used to
' separate the substrings in the
' returned string. If omitted, the
' space character (" ") is used. If
' delimiter is a zero-length string,
' all items in the list are
' concatenated with no delimiters.
Dim myList(5)
Dim myListString
myList(0) = "Fred"
myList(1) = "Bob"
myList(2) = "Mike"
myList(3) = "Sue"
myList(4) = "Sam"
myList(5) = "Bill"
myListString = Join(myList, ", ")
MsgBox myListString, vbInformation, "Join Sample"
|
|