LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA, Reading File As Binary

I needed to change Unix EndOfLine style "only CR" to Win style "LFCR"
so I tried to run following code in VBA:

Sub Modification()
Dim ff1, ff2 As Byte
ff1 = FreeFile
ff2 = FreeFile + 1
Dim a, b As Double
Open "original.csv" For Binary As #ff1
Open "modified.csv" For Binary As #ff2

Do Until EOF(ff1)
Get #ff1, , a
If a = 10 Then
b = 13
Put #ff2, , b
End If
Put #ff2, , a
Loop
Close
End Sub

but when it gets to Get command it says "Run-time error 458, Variable
uses an Automation type not supported in Visual Basic". Can someone,
please, help me.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading binary file Maxi[_2_] Excel Programming 3 April 15th 06 12:15 AM
Solver returns non binary answer in binary constrained cells Navy Student Excel Worksheet Functions 6 September 1st 05 03:11 PM
Binary operations (left/right shift, binary and/or, etc.) Mike Hodgson Excel Programming 4 June 17th 05 09:27 AM
Help reading binary file Luis[_5_] Excel Programming 2 July 29th 04 05:48 PM
Excel binary file format Rob Bovey Excel Programming 1 November 8th 03 12:04 PM


All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"