I have createing the forms, but I like to write a code where I type in a name they will go to customers.txt and also display in the frmLeger1. That is not the problem is that once i type in the name such as sam it show customername.tx t, and display in frmLedger1.capt ion, I want the code I can save it, so that next time i run the program the name is saved. I hope some one can usderstand.
Code:
Private Sub create_Click()
Dim num As Integer
Dim CustomerName As String
Dim prstName As String
Dim prstCustomerName As String
Open "C:\CustomerName.txt" For Append As #1
Write #1, Text1
Close #1
cboDirectory.Filter = "Project files(*.frm)|*.frm"
cboDirectory.Filter = 1
cboDirectory.InitDir = "c:\"
prstName = Text2
cboDirectory.FileName = Text2
'Open cdl.FileName For Input As #1
cboDirectory.ShowSave
num = InputBox("Enter the number of the file, you want to create ")
If num = 1 Then
frmleger1.Caption = Text1