I can declare a static byte array in VBA like this, but it appears that the elements are not of type byte.
Dim A As Variant
A = Array(&H9F, &H2C, &H3B, &HFF, &H84)
I can solve this by copying the content to a second array, but that doesn't look very efficient to me.
Dim A As Variant
A = Array(&H9F, &H2C, &H3B, &HFF, &H84)
Dim N As Long: N = UBound(A)
Dim B() As Byte
ReDim B(N)
For X = 0 To N
B(X) = A(X)
Next
So my question is: is there a better or more elegant way to do this?