I am currently creating a program for my course that requires me to create text files for transactions. I have already made a file that will hold the information but I wish to add more so that I can have multiple files that will contain text files for each transaction and store them in a folder marked with the date.
My problem is I do not know of any way in which folders can be created
my code so far...
CODE
Open "W:\filesaves\Transactions.txt" For Append As 1 'Opens or creates the file for storing transaction details
Print #1, "" 'Prints a gap from the last record
Print #1, ""
For X = 1 To 21
If lstItems.List(X - 1) <> "" Then 'Prints all items in the list to the text file
Print #1, "Item name " & lstItems.List(X - 1)
Print #1, "Quantity " & lstQnty.List(X - 1)
Print #1, "Price " & lstPrices.List(X - 1)
Print #1, ""
End If
Next X
Print #1, "Total Price £" & txtTotal.Text 'Prints the total price
Print #1, ""
Print #1, Time, " " & Date 'Prints the time and date for the transaction
Print #1, "______________________________________________________"
I have tried to use the open command to create the folder but had an error message stating that the path cannot be found. I am currently using Visual Basic 6 for this application.