> OK, the code compilesand works. here is the complete sub
```vba
Private Sub BinWrite(ByRef fFile As BinFile, ByVal intChar As Integer)
With fFile
Mid(.buffer, .buffer_pos + 1, 1) = Chr(intChar)
.buffer_pos = (.buffer_pos + 1)
If .buffer_pos >= &H4000 Then
Put .file_num, , .buffer
.buffer_pos = 0
End If
End With
End Sub
``