Hi all, Couldnt find any information on this the other day when I was looking for it so I thought Id post how I done it.

VB Code:
  1. 'Write a byte array (in Unicode Big Endian) from a string
  2. Public Function WriteUnicodeBigEndian(Text As String) As Byte()
  3.     Dim i As Integer, TempArray() As Byte
  4.     ReDim TempArray(0 To Len(Text) * 2)
  5.     For i = 0 To (Len(Text) * 2)
  6.         If Len(Text) = 0 Then Exit For
  7.         If i Mod 2 Then
  8.             TempArray(i) = AscW(Text)
  9.             Text = Right(Text, Len(Text) - 1)
  10.         Else
  11.             TempArray(i) = 0
  12.         End If
  13.     Next i
  14.     WriteUnicodeBigEndian = TempArray
  15. End Function
  16.  
  17. 'Write a byte array (in Unicode Little Endian) from a string
  18. Public Function WriteUnicodeLittleEndian(Text As String) As Byte()
  19.     Dim i As Integer, TempArray() As Byte
  20.     ReDim TempArray(0 To Len(Text) * 2)
  21.     For i = 0 To (Len(Text) * 2)
  22.         If Len(Text) = 0 Then
  23.             List2.AddItem 0
  24.             Exit For
  25.         End If
  26.         If i Mod 2 Then
  27.             TempArray(i) = 0
  28.         Else
  29.             TempArray(i) = AscW(Text)
  30.             Text = Right(Text, Len(Text) - 1)
  31.         End If
  32.     Next i
  33.     WriteUnicodeLittleEndian = TempArray
  34. End Function

There ya go, Them two functions converts the string passed to the function into an array in the format of Unicode Little Endian or Unicode Big Endian.

Enjoy.