Hey...
I've got a program...that organises customers...
I want to create text files of each day........cont aining the IDs of customers seen........ However i want to organise the Text files in folders for each month...how should i go about creating the files and folders...?
first of all, use smart names for the folders:
Jan2008, Feb2008, etc.. is a good idea.
use a function that creates the folder each time with an error handler, so if the folder already exists, it wont do anything.
so each time you generate a report:
- dim path as string
-
on error resume next
-
mkdir "c:\yourpath\" & MonthFunction(month(date)) & Year(date) & "\"
-
on error goto 0
-
'[your code for creating the txt file and save it in Path]
Create a MonthFunction to write Jan, Feb, Mar... using Select Case.
I think that's the main idea. Use smart names for the files too, it'll save you a lot of time in the future.
HTH
[Edit]Note: how to create the txt file depends on the version, but using OPEN/ FOR/AS , then PRINT and then CLOSE, should do for most of the cases.[/edit]