Consulting

Results 1 to 5 of 5

Thread: Solved: Strange Array Problem

  1. #1
    VBAX Newbie
    Joined
    Feb 2005
    Posts
    2
    Location

    Solved: Strange Array Problem

    Hi,
    I recently switched to a Mac, and when trying to use my excel-macros from winxp, I got the following problem:

    the code is something like:

    [VBA] Dim myArray()
    myArray = Range("A110").Value[/VBA]

    and runs perfectly with win, but I get an error message "cannot assign values to data array" (or something like that, it's actually in German) with mac.

    I tried to get some work-around, but nothing seems to work. I know that I could assign the values through a loop, but the idea was to avoid that (because the range, actually, is much much bigger, and assigning the values to the array directly is much faster!)

    Anyone a clue?
    Paul.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Try

    [VBA]
    Dim myArray
    myArray = Range("A110").Value
    [/VBA]

  3. #3
    VBAX Newbie
    Joined
    Feb 2005
    Posts
    2
    Location

    Smile

    Thanks, it worked! (That was an easy one!)

  4. #4
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi pinky777,

    set the thread to Solved then.
    At the top of this page select "Thread Tools" then "Mark Solved".
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  5. #5
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Glad to help. (I like the easy ones!)
    MD

Posting Permissions

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