Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Exporting .xls file with file name changeable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Kendall - 17 Mar 2005 21:05 GMT
I need to export a file.  That's the easy part.
The difficult part is I need the file to be named YYYY-MM based on the data
range someone pulls.  How do I do this?
Furthermore, I need the file to place the data on a certain tab in a certain
cell.  How do I do this?
If possible I would like to build a .xls template and have it open it and
then save it as the YYYY-MM filename.

Call it your brain challenge of the day.  Thanks.
Signature

Thank you for your time.
Windows NT
Office 97

Alex Dybenko - 17 Mar 2005 21:36 GMT
You can use docmd.transferspreadsheet to export to excel and pass it a file
name constructed on entered date using format function:

strFileName="C:\Data" & Format(dateVar,"YYYY-MM") & ".xls

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

>I need to export a file.  That's the easy part.
> The difficult part is I need the file to be named YYYY-MM based on the
[quoted text clipped - 7 lines]
>
> Call it your brain challenge of the day.  Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.