Results 1 to 2 of 2

Thread: VBA Dynamic array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    VBA Dynamic array

    I'm having a nightmare simply trying to define a dynamic array and write data to it.

    Basically I have the following :-

    Where y is already defined as the function and updates as the function is called. I want to add the y value to an array so I can fix the max value of y when the function reaches the end i.e. no more updates.

    y As Integer,


    Dim Arr1() as variant

    Arr1() = y



    Doesn't work , saying compile error can't assign to an array.

    Any suggestions ?
    Last edited by cblake843; 11-29-2018 at 04:24 AM.

Tags for this Thread

Posting Permissions

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