Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Compare Database
Option Explicit

' ** Access Toolbox Module **
' on 2017-02-28,
' @author: Olivier Massot
' V 1.0

' Text File Object

Private loc_ref As Variant
Private loc_path As String

Property Let path(path As String)
  loc_path = path
End Property
Property Get path() As String
  path = loc_path
End Property

Public Sub create_file(Optional path As String = "")
Dim ref As Variant

  If Len(chemin) > 0 Then loc_path = chemin
  loc_ref = FreeFile(1)
  Open loc_path For Append Access Write Shared As locRef

End Sub

Public Sub write_line(str As String)
  Print #locRef, str
End Sub

Public Sub close_file()
  Close #locRef
End Sub

Private Sub class_Terminate()
  Close #locRef
End Sub