Mightyginger
Programmer
Hi,
I have a text file with a lot of dates in it - they are holidays. In excel I need to write some vba code whereby I can type a date into a cell and it then searches through the textfile and checks to see if that date exists - if it does then it's a holiday.
The textfile looks like this.
01/01/03
02/01/03
03/01/03
(e.g day/month/year)
but can be made up ina different format if necessary.
My first though was just to open the text file, read it into an array and then check through the array to see if it existed. Someone has suggested that it might be easier instead to set the textfile as a db and then search through it directly and treat it just like a db. I've not used any of these commands before and was wondering (this is a bit cheeky I know) if someone could give me a rough outline of how the code might do to once the textfile is set as the db to then query a variable against the entries to see if the variable exists in the file.
Thanks again guys,
Neil.
I have a text file with a lot of dates in it - they are holidays. In excel I need to write some vba code whereby I can type a date into a cell and it then searches through the textfile and checks to see if that date exists - if it does then it's a holiday.
The textfile looks like this.
01/01/03
02/01/03
03/01/03
(e.g day/month/year)
but can be made up ina different format if necessary.
My first though was just to open the text file, read it into an array and then check through the array to see if it existed. Someone has suggested that it might be easier instead to set the textfile as a db and then search through it directly and treat it just like a db. I've not used any of these commands before and was wondering (this is a bit cheeky I know) if someone could give me a rough outline of how the code might do to once the textfile is set as the db to then query a variable against the entries to see if the variable exists in the file.
Thanks again guys,
Neil.