Displaying an Array in a MsgBox
Posted on 2006-07-07
I have a text file which has each persons name and their email, (eg. John Smithfirstname.lastname@example.org) and i have code which tests to see whether a pdf pay slip exists (eg.John Smith Pay Slip.pdf). What i want to do is display the values of the array of people who do not have a pay slip for the particlaur period, into a msgbox and the same for the ones who do. (lines ****). Any ideas of how to even assign these values to 2 different arrays which could be displayed?
For intCounter = LBound(arrFiles) To UBound(arrFiles)
strFilename = "H:\Files\" & arrFiles(intCounter) & " " & "Pay Slip.pdf"
If objFSO.FileExists(strFilename) Then
***** 'store values of names who DO have files
Set olkMessage = Application.CreateItem(olMailItem)
.Subject = "Pay Slip" & " for " & Mid(strFolder, 4, Len(strFolder) - 3)
.Body = "Here's your pay slip."
'Change the file name and path on the following line as desired
***** 'store names of files which DO NOT exist