Array of Bytes to Array of Integers
I presume Integer is OK for what you want?
I might be on the wrong track to help you, but in case this does give you a start, here is a real simple
Code:
' in a module
Option Explicit
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
In a form or wherever
Code:
Option Explicit
Dim array1(0 To 7) As Byte
Dim array2(0 To 3) As Integer
Private Sub Form_Load()
Dim c As Integer
Debug.Print array2(0), array2(1)
For c = 0 To 7
array1(c) = c+1
Debug.Print array1(c)
Next
CopyMemory array2(0), array1(0), 8
' should get 4 integers made up of the following lo/hi bytes:
' 1,2 = 257
' 3,4 = 1027
' 5,6 = 1541
' 7,8 = 2055
Debug.Print array2(0), array2(1), array2(2), array2(3)
End Sub
Do you see how it works? CopyMemory is really quite fast for what you want to do.
Regards
Paul Lewis