Passing Arrays to a Subroutine
How do you pass an array to a subroutine? My subroutine works well while
FileName is just a string variable, but when I create an array (arrFileName()) It doesn't work within the subroutine.
This is where I call the subroutine:
Call EmailAttach(strEmail, arrFileName(), strSubject, strBody)
This is the section of code within the subroutine:
For iCount = 0 to numFiles
Mail.AddAttachment strPath & arrFileName(iCount)
Omit the parentheses from the array name.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)