+ Reply to Thread
Results 1 to 7 of 7

Array VBA question

  1. #1
    Forum Contributor
    Join Date
    05-18-2004
    Location
    Portland, Oregon
    MS-Off Ver
    2016
    Posts
    182

    Array VBA question

    All,

    I am trying to get my Array Formula in a Macro, so the user can just hit a button and the formula is pasted into the cell and turned into an array.

    Please Login or Register  to view this content.
    I am able to get the formula into the cell with the macro, but not turn it into an array. The above does not work.

    Thoughts?

    Cheers
    Matt
    Last edited by matt4003; 07-13-2011 at 08:55 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Array VBA question

    Hello Matt,

    What happens when you execute the macro? Do you get an error message?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    05-18-2004
    Location
    Portland, Oregon
    MS-Off Ver
    2016
    Posts
    182

    Re: Array VBA question

    Hi Leith,

    Yes, an error:

    "Run-time error '1004':
    Unable to set the FormulaArray property of the Range class"

    Thoughts?

    Matt

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Array VBA question

    Hello Matt,

    Try doing this way without selecting the cell.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-18-2004
    Location
    Portland, Oregon
    MS-Off Ver
    2016
    Posts
    182

    Re: Array VBA question

    Hello Leith,

    I tried that. Same error.

    I have a hard time imagining that it is the problem, but could it be that this is an excel 97-2003 file that I am working on in excel 2010?

    Cheers,
    Matt

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Array VBA question

    Hello Matt,

    The FormulaArray property is limited to 255 characters. Your string is 290 characters.

  7. #7
    Forum Contributor
    Join Date
    05-18-2004
    Location
    Portland, Oregon
    MS-Off Ver
    2016
    Posts
    182

    Re: Array VBA question

    Sorry for the delay Leith, I have been in the process of relocating to Europe from the US.

    Your solution was perfect!

    Thanks,
    Matt

+ 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