Results 1 to 9 of 9

Thread: [RESOLVED] how to check if a txt file is not in the path and create it

Threaded View

  1. #1

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Resolved [RESOLVED] how to check if a txt file is not in the path and create it

    i have a code that opens a txtfile
    now my question is if this file dosnt exists how do i create it?
    this is my code

    e.x
    if txtdata.txt dosnt exists then to create it and continue with the code

    Code:
            Dim NameFile
            NameFile = FreeFile
            Open "C:\PremiumGold_USER_DATA\txtdata.txt" For Output As #NameFile
            Print #1, TxtCust.Text
            Print #1, TxtPay.Text
            Print #1, CmbMethod.Text
            Print #1, CmbPay.Text
            Close #1
    
            Dim Slika As String
            Dim Filename As String
            Filename = "C:\PremiumGold_USER_DATA\pfs.exe"
            Slika = Shell(Filename, vbNormalFocus)
    any help will be appreciated
    regards salsa 31
    Last edited by salsa31; Dec 23rd, 2014 at 05:29 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width