VBA/Excel/Access/Word/File Path/Binary File — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 16:33, 26 мая 2010
create temporary binary file test.bin
Option Explicit
Private Sub CreateBinaryFile()
Dim sq As Double, i
Open Environ("temp") + "\test.bin" For Binary As #1
For i = 1 To 100
sq = Sqr(i)
Put #1, , sq
Next i
Close #1
End Sub
open file, show first three entries in immediate window
Private Sub LoadBinaryFile()
Dim dbl As Double, i
Open Environ("temp") + "\test.bin" For Binary As #1
Seek #1, 8 * 14 + 1
For i = 1 To 3
Get #1, , dbl
Debug.Print dbl
Next i
Close
End Sub