+ Reply to Thread
Results 1 to 3 of 3

How can I randomly reorder my values in my array?

  1. #1
    Registered User
    Join Date
    05-14-2008
    Posts
    27

    How can I randomly reorder my values in my array?

    Hello,

    I created an array of string as follows:

    Dim MyData(1 To 6, 1 To 6) As String

    Then I gave values to the 36 array elements as follows:
    MyData(1,1) = "New York"
    MyData(1,2) = "France"
    MyData(1,3) = "John"
    ...
    MyData(6,6) = "Radio"

    How can I randomly reorder my values in my array?

    A side question:
    Can I give values to MyArray in an easier way that one value per code line?

    Thank You,
    Miguel
    Last edited by VBA Noob; 05-14-2008 at 05:31 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This will randomly reorder the elements of a 2-D array
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    05-14-2008
    Posts
    27

    Question

    Thank You for your help!

+ 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