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
any help will be appreciatedCode: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)
regards salsa 31




Reply With Quote