Emptying an array!

C

cimento cola

Hello.
I have an array filled with data (within excel - vba). If i set this code:

For k = 1 To L
MsgBox Prompt:="Number: " & numdoc(k) & ".", _
Title:="Display number", _
Buttons:=vbInformation
Next k

i get L msgbox´s. Is there a way to display the array information all at
once? With this code, if L = 1000, i will get 1000 msgbox; i only want 1!
Thsnks in advance,
 
S

Steve Rindsberg

I have an array filled with data (within excel - vba). If i set this code:
For k = 1 To L
MsgBox Prompt:="Number: " & numdoc(k) & ".", _
Title:="Display number", _
Buttons:=vbInformation
Next k

i get L msgbox´s. Is there a way to display the array information all at
once? With this code, if L = 1000, i will get 1000 msgbox; i only want 1!
Thsnks in advance,

As modified:
Dim Message as String
For k = 1 To L
Message = Message & "Number: " & numdoc(k) & "." & vbcrlf
Next k

MsgBox Prompt:=Message, _
Title:="Display number", _
Buttons:=vbInformation
 
C

cimento cola

Works fine! Thanks for the help!



Steve Rindsberg said:
As modified:
Dim Message as String
For k = 1 To L
Message = Message & "Number: " & numdoc(k) & "." & vbcrlf
Next k

MsgBox Prompt:=Message, _
Title:="Display number", _
Buttons:=vbInformation
 

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

Top