www.webdeveloper.com
Results 1 to 2 of 2

Thread: Passing Arrays to a Subroutine

  1. #1
    Join Date
    Aug 2003
    Posts
    17

    Passing Arrays to a Subroutine

    Hi,

    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)
    Next
    Lee Firth

  2. #2
    Join Date
    Dec 2004
    Posts
    8,637
    Omit the parentheses from the array name.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles