how do i create a folder once i have a program i have been trying to figure out a way to do this so it doesn't keep trying to create it every time i open up the program here is my code
so everytime i click on this button it dosen't say "File Already Exist"
any input would be useful to me at this point..thanks in an advanced
lee123
Code:
Private Sub Form_Load()
Dim fso As New FileSystemObject, fldr As Folder
Set fldr = fso.CreateFolder("C:\Program Files\My Bill Backup Files")
End Sub
Code:
Private Sub ProcessBtn_Click()
Dim Answer As Integer
Dim ff As String
ff = FreeFile
Me.Refresh
Open "C:\Program Files\My Bill Backup Files\BillFileSaverBackup.log" For Append As #ff
Print #ff, "Bill Saver Backup Log" & " " & vbNewLine
Print #ff, "Date Filed:" & " " & Date
Print #ff, "Bill Name:" & " " & BillName
Print #ff, "Date Paid:" & " " & DatePaid
Print #ff, "Amount Paid:" & " " & AmountPaid
Print #ff, "Reference Number:" & " " & ReferenceNumber
Print #ff, "-------------------------------------------------"
Close #ff
Answer = MsgBox("Do You Wish To Put Anymore Bills In The Filing Cabinet?", vbYesNo + vbQuestion, "Whats Ur Response...?")
If Answer = vbYes Then Adodc1.Recordset.AddNew
Adodc1.Recordset.MoveNext
If Answer = vbNo Then Exit Sub
If ProcessBtn Then
Label5.Caption = "Thank You!"
Picture1.Visible = False
Picture2.Visible = True
End If
End Sub
lee123
Comment