Re: How do I get the transfer text macro to ask me for the path ?
- From: AFSSkier <AFSSkier@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 09:51:00 -0700
I'm not sure you understand my question.
I created a macro to export a query as a csv file per your previous
directions.
File Name: ="C:\MyPath\" & InputBox("Enter File Name:")&".csv"
However, I would like to set Field Name to NO like in TransferSpreadsheet.
But I using OutputTo.
--
Thanks, Kevin
"Ken Snell (MVP)" wrote:
You could use an expression like this for the FieldNames argument:.
=IIf(InputBox("Do you want field names? Enter Yes or No ...","Field
Names?")="Yes", True, False)
--
Ken Snell
<MS ACCESS MVP>
"AFSSkier" <AFSSkier@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:79DD8927-1BA5-4678-98DA-C3924F9383D8@xxxxxxxxxxxxxxxx
How can you set Field Name to NO like in TransferSpreadsheet? I'm
exporting
as CSV.
--
Thanks, Kevin
"Ken Snell [MVP]" wrote:
If you just want to enter a filename, use InputBox to get it from user:
File Name: ="C:\MyPath\" & InputBox("Enter File Name:")
If you want to enter the full path and file name:
File Name: =InputBox("Enter Path and File Name:")
If you want to browse to the file, you can use an API function to open
the
"File Open" dialog box. This page on The ACCESS Web has code for using
the
API to do this. You can substitute the ahtCommonFileOpenSave function
call
in the argument list in the TransferText action, similar to the examples
above:
http://www.mvps.org/access/api/api0001.htm
--
Ken Snell
<MS ACCESS MVP>
"Cab Max Dave" <Cab Max Dave@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CDF6D4C6-0247-4AD7-8FD9-02395C1FFA63@xxxxxxxxxxxxxxxx
I am trying to create a macro to export a table as a csv file and i want
the
macro to ask me for the file name when i run it instead of putting one
in
the
"file Name" field
- Follow-Ups:
- Re: How do I get the transfer text macro to ask me for the path ?
- From: Ken Snell \(MVP\)
- Re: How do I get the transfer text macro to ask me for the path ?
- References:
- Re: How do I get the transfer text macro to ask me for the path ?
- From: Ken Snell \(MVP\)
- Re: How do I get the transfer text macro to ask me for the path ?
- Prev by Date: Re: Set (Same) Value
- Next by Date: Re: How do I get the transfer text macro to ask me for the path ?
- Previous by thread: Re: How do I get the transfer text macro to ask me for the path ?
- Next by thread: Re: How do I get the transfer text macro to ask me for the path ?
- Index(es):
Relevant Pages
|