+ Reply to Thread
Results 1 to 4 of 4

Determining Array Limit

  1. #1
    Chaplain Doug
    Guest

    Determining Array Limit

    Excel 2003. I am using the following code to read filename(s) into a variant
    array. How may I determine how many files were selected? Or how may I
    determine

    Dim Fname as Variant
    FName = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , "Select
    RD Workbooks to Email", , True)

    I get an error when I try to access FName and move beyond the last array
    element trying to determine how many elements (file names) there are.

  2. #2
    Frank Kabel
    Guest

    Re: Determining Array Limit

    Hi
    have a look at UBound in the VBA help


    --
    Regards
    Frank Kabel
    Frankfurt, Germany
    "Chaplain Doug" <[email protected]> schrieb im
    Newsbeitrag news:[email protected]...
    > Excel 2003. I am using the following code to read filename(s) into a
    > variant
    > array. How may I determine how many files were selected? Or how may I
    > determine
    >
    > Dim Fname as Variant
    > FName = Application.GetOpenFilename("Excel Files (*.xls), *.xls", ,
    > "Select
    > RD Workbooks to Email", , True)
    >
    > I get an error when I try to access FName and move beyond the last array
    > element trying to determine how many elements (file names) there are.




  3. #3
    Alan Beban
    Guest

    Re: Determining Array Limit

    Frank Kabel wrote:
    > Hi
    > have a look at UBound in the VBA help
    >
    >

    More specifically, since it might not be apparent from the On-line help:

    UBound(myArray) - LBound(myArray) + 1

    Alan Beban

  4. #4
    Chaplain Doug
    Guest

    Re: Determining Array Limit

    Thank you Alan and Frank. God bless.

    "Alan Beban" wrote:

    > Frank Kabel wrote:
    > > Hi
    > > have a look at UBound in the VBA help
    > >
    > >

    > More specifically, since it might not be apparent from the On-line help:
    >
    > UBound(myArray) - LBound(myArray) + 1
    >
    > Alan Beban
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1