Results 1 to 3 of 3

Declare an array with variable size

Threaded View

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    97

    Declare an array with variable size

    I need to create an array with a variable as it size

    For instance:

    Dim nSize as Integer
    
    nSize = 4
    
    Dim nArray(nSize) as Integer
    But this doesn't work, I get an error: "Constant expression required"

    Is there anyway that I can do this?
    Last edited by gtmeloney; 05-07-2009 at 02:44 PM.

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