naming export file name

C

Cecilia R.

hi,

I create a macro using the TransferText action and at the File name, i would
like to add the date. I use the following syntax:

Use the syntax...
[file path/filename] & Format(Date(),"[format string]") & ".xls"

So my file name read like this:
S:\Finance\InvoiceExportTest & Format(Date(),"yyyy-mm-dd") & ".txt"

However, iam getting this error message
"Cannot update. Databe or object is read only."

Is my syntax correct? Is there other way that i could add the current date
whenever i export my data to a text file using the transfer text command?

Thanks in advance to those who can shed me some light!
 
G

Graham Mandeno

Hi Cecilia

I suspect that the problem is not with the filename. Have you tried it with
another filename - for example, "C:\Test.txt"?

I suggest you try that, and also check that you have the permissions to
create a file in S:\Finance, and if you are still having trouble then post
back here with a bit more of your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top