Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binary files

Status
Not open for further replies.

01310564

Programmer
Oct 9, 2003
96
GB
Is it posible to read a file in binary rather than text?

Cheers,

Hugh
 
Function ReadBinaryFile(FileName)
Const adTypeBinary = 1

'Create Stream object
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")

'Specify stream type - we want To get binary data.
BinaryStream.Type = adTypeBinary

'Open the stream
BinaryStream.Open

'Load the file data from disk To stream object
BinaryStream.LoadFromFile FileName

'Open the stream And get binary data from the object
ReadBinaryFile = BinaryStream.Read
End Function

For more info:
MrGreed

"did you just say Minkey?, yes that's what I said."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top