Example of writing a file:


VERSION 5.00
Begin VB.Form frmWrite1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtPriorPay 
      Height          =   285
      Left            =   1200
      TabIndex        =   5
      Top             =   1920
      Width           =   1335
   End
   Begin VB.TextBox txtMarital 
      Height          =   285
      Left            =   1200
      TabIndex        =   4
      Top             =   1560
      Width           =   855
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "Exit"
      Height          =   375
      Left            =   2760
      TabIndex        =   8
      Top             =   2640
      Width           =   855
   End
   Begin VB.CommandButton cmdClear 
      Caption         =   "Clear"
      Height          =   375
      Left            =   1560
      TabIndex        =   7
      Top             =   2640
      Width           =   855
   End
   Begin VB.CommandButton cmdWrite 
      Caption         =   "Write"
      Height          =   375
      Left            =   240
      TabIndex        =   6
      Top             =   2640
      Width           =   975
   End
   Begin VB.TextBox txtExempt 
      Height          =   285
      Left            =   1200
      TabIndex        =   3
      Top             =   1200
      Width           =   855
   End
   Begin VB.TextBox txtHours 
      Height          =   285
      Left            =   1200
      TabIndex        =   2
      Top             =   840
      Width           =   855
   End
   Begin VB.TextBox txtPayHour 
      Height          =   285
      Left            =   1200
      TabIndex        =   1
      Top             =   480
      Width           =   855
   End
   Begin VB.TextBox txtName 
      Height          =   285
      Left            =   1200
      TabIndex        =   0
      Top             =   120
      Width           =   2415
   End
   Begin VB.Label lblPriorPay 
      Caption         =   "Prior Pay"
      Height          =   255
      Left            =   120
      TabIndex        =   14
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label lblMarital 
      Caption         =   "Marital"
      Height          =   255
      Left            =   120
      TabIndex        =   13
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label lblExempt 
      Caption         =   "Exemptions"
      Height          =   255
      Left            =   120
      TabIndex        =   12
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label lblHours 
      Caption         =   "Hours"
      Height          =   255
      Left            =   120
      TabIndex        =   11
      Top             =   840
      Width           =   855
   End
   Begin VB.Label lblPayHour 
      Caption         =   "Pay/Hour"
      Height          =   255
      Left            =   120
      TabIndex        =   10
      Top             =   480
      Width           =   855
   End
   Begin VB.Label lblName 
      Caption         =   "Name"
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   120
      Width           =   975
   End
End
Attribute VB_Name = "frmWrite1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit





Private Sub cmdClear_Click()
    txtName.Text = ""
    txtPayHour.Text = ""
    txtHours.Text = ""
    txtExempt.Text = ""
    txtMarital.Text = ""
    txtPriorPay.Text = ""
    txtName.SetFocus
End Sub

Private Sub cmdExit_Click()
Close #1
    End
End Sub

Private Sub cmdWrite_Click()
    Write #1, txtName.Text, txtPayHour.Text, txtHours.Text, txtExempt.Text, txtMarital.Text, txtPriorPay.Text
End Sub


Private Sub Form_Load()
    Open "A:\Pay" For Output As #1
End Sub