Consulting

Results 1 to 3 of 3

Thread: Solved: Set all array elements to same value?

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

    Solved: Set all array elements to same value?

    Hi all,
    Is there a quick way to set all elements of an array ( say, arrTest() ) to a single value.

    In this case I want all elements to be zero, but there are times I might want all elements to start at 100, or some other number.

    Thanks in advance.

    Aljrob

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Aljrob
    Hi all,
    Is there a quick way to set all elements of an array ( say, arrTest() ) to a single value.

    In this case I want all elements to be zero, but there are times I might want all elements to start at 100, or some other number.

    Thanks in advance.

    Aljrob
    No quick way to initialise an array. You either loop through it, or set a range to the value, then copy that back
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Newbie
    Joined
    Feb 2005
    Posts
    2
    Location
    Quote Originally Posted by xld
    No quick way to initialise an array. You either loop through it, or set a range to the value, then copy that back
    Dammit! That's what I feared. Thx for quick response...

Posting Permissions

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