Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Arrays 1

Status
Not open for further replies.

cyoung

Programmer
Oct 31, 2001
188
US
I have an array that I need to pass to a variable so that I can email the contents.

The array is structured like this:

filename1,filename2,filename3......

I need to be able to work with this so that I can use the SendObject to email the list of filenames. The email needs to be formatted as follows:

filename1
filename2
filename3

The only issue that I am having occurs when there is more than 1 filename.

Any ideas?

Thanks!
 
I think what you mean is this. You have an array like this, FileName(1 to 3) which has your file names. You want to put this into a String so that you can pass it into an email, but need it delimited with line Feeds. What you could do is this.
[tt]
For i = 1 to UBound(FileName)
strVariable = strVariable & FileName(i) & vbCrLf
Next i
[/tt]
UBound will tell you how many items are in the array
vbCrLf will instruct VB that this is a line feed or enter Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
Craig,

Thanks!

It is amazing how sometimes you can overlook the obvious. I was already doing a similar routine to pass the individual filenames for processing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top