Results 1 to 3 of 3

Thread: [Resolved] CopyMemory to copy data from 1D to 2D array

Threaded View

  1. #1

    Thread Starter
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    [Resolved] CopyMemory to copy data from 1D to 2D array

    Is there some clever way to use CopyMemory to fill a 2D array from a 1D array? I suspect there isn't, but thought I'd ask. Certainly the tried and true nested loop will do it - was just looking for a more compact way to do it.

    VB Code:
    1. Dim bArray2(0 to 31, 0 to 16) as byte
    2. Dim bArray1(0 to 511) as byte
    3.  
    4. CopyMemory ??, bArray1(0), 512&
    Last edited by VBAhack; Mar 21st, 2006 at 01:59 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width