PDA

View Full Version : Text File Export



FrymanTCU
11-07-2008, 09:57 AM
Ok I know I have run into problems with VBA exporting files before. I have a delimited text file I am creating every night and exporting to a specific directory, and then FTP'd to a external server. Due to some changes I need to drop the .txt extenstion on the file but when I do this in my code I get an error, database object is read only.

Can I fix this in VBA or do I need some kind of .cmd or VBscript to remove the extenstion?

Thanks,
Rich

Demosthine
11-08-2008, 09:33 PM
Good Evening.

The easiest way to do this would be to have your VBA Code just rename the file right before it is uploaded to the FTP Server. You can accomplish this through the Name statement or the FileScriptingObject quite easily.

The Help File has plenty of info on both.
Scott