decimalValue = CDec(0) For i = 0 To 11 decimalValue = decimalValue + CDec(byteArray(i)) * CDec(256) ^ CDec(i) Next