Переписывает код Боанна, поскольку он пишет новую строку (2 байта) в конце выходного файла.
Function bin2var(filename As String) As String
Dim f As Integer
f = FreeFile()
Open filename For Binary Access Read Lock Write As #f
bin2var = Space(FileLen(filename))
Get #f, , bin2var
Close #f End Function
Sub var2bin(filename As String, data As String)
Dim f As Integer
f = FreeFile()
Open filename For Binary Access Write As #f
Put #f, , data
Close #f
End Sub