The code below is a fragment of a macro I'm writing to alert users that they may not have a sufficient number of compatible installation equipment on an order. n shortfalls (i.e., each instance of an equipment item not having compatible installation equipment are saved in the yankees() array in elements 1 to n. What I want to do is prompt users with a message box stating "Please review your order to ensure you have you sufficient compatible installation equipment- we detected the following shortfalls"
and below that
include all each element of yankees(1 to n) on separate lines in a message box with two options below "This is okay, I'll submit my order now" and "Let me go back,I want to modify my order".
How can I create such a message box?
I have:
MsgBox "Please review your order to ensure you have you sufficient compatible installation equipment- we detected the following concerns" & yankee(1), vbOKCancel
currently but this only includes the first shortfall. How can I include all elements of yankee() and put them on their own line?
This question really boils down to: "How do I put all non-blank elements of an array variable onto their own lines in a message box prompt"?
Do
If rip(qbert) < k(qbert) Then
yankee(jets) = "Your order for" & s(qbert) & " contains " & k(qbert) - rip(qbert) & " too few " & g(qbert)
jets = jets + 1
qbert = qbert + 1
Else
qbert = qbert + 1
End If
Loop Until qbert > echo