Greeting.
I want to input data from a binary file and display those data in Excel as HEX strings.
Putting aside the HEX string for now, I tried just getting each byte of binary data but it didn't work like I was hoping.
First I tried:
but that put the byte as a character in the cell, as one would expect.
I tried:
but that threw a type mismatch error.
I looked in the thread archive and found something that looked like it should work for me, using
open <filename> for random as #1 len=1
and get #1, 1, bytevar, but that gave me an error because of automation unsupported
I'm pretty new to VBA so I'm sure there's something simple I need to know but I'm not finding it.
Any ideas?
_________________
Bob Rashkin
I want to input data from a binary file and display those data in Excel as HEX strings.
Putting aside the HEX string for now, I tried just getting each byte of binary data but it didn't work like I was hoping.
First I tried:
Code:
open tstdat3.bin for binary as #1
cells(1,1)=input(1,#1)
I tried:
Code:
open tstdat3.bin for binary as #1
cells(1,1)=cint(input(1,#1))
but that threw a type mismatch error.
I looked in the thread archive and found something that looked like it should work for me, using
open <filename> for random as #1 len=1
and get #1, 1, bytevar, but that gave me an error because of automation unsupported
I'm pretty new to VBA so I'm sure there's something simple I need to know but I'm not finding it.
Any ideas?
_________________
Bob Rashkin