Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get bytes from file
I have been using a trick to get data from a binary file. The trick is
to initialize a variable as follows: XXX=" " Get #FileNum, 1, XXX that gets 10 bytes from the file. I want, however to use the option explicit mode but as soon as I declare the variable Dim XXX I get a run time error "Variable uses automation type not supported by visual basic" but if I do not use the explicit option everything works. I want to understand how to extract X bytes from the file, becase I have a section where I have strings and integers (I know the file format) TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get bytes from file
Since you are setting it to a string of 10 characters, it must be a string,
no? So the statement should be Dim XXX As String 'to fetch the strings Dim i As Integer 'to fetch the integers On 12 Oct 2004 18:31:40 -0700, (Luis Amezcua) wrote: I have been using a trick to get data from a binary file. The trick is to initialize a variable as follows: XXX=" " Get #FileNum, 1, XXX that gets 10 bytes from the file. I want, however to use the option explicit mode but as soon as I declare the variable Dim XXX I get a run time error "Variable uses automation type not supported by visual basic" but if I do not use the explicit option everything works. I want to understand how to extract X bytes from the file, becase I have a section where I have strings and integers (I know the file format) TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
0 bytes | Excel Discussion (Misc queries) | |||
How many bytes? | Excel Discussion (Misc queries) | |||
file 0 bytes | Excel Discussion (Misc queries) | |||
How to get the size of the excel file, a sheet size (in bytes)? | Excel Programming | |||
File with too Bytes? | Excel Programming |