Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced Excel Export 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I have a query I would like to export as a spreadsheet, for not-advanced-computer-users.

The problem is that the docmd.transferspreadsheet doesn't seem to provide some normal functionality like choosing where to save and warning if overwriting etc.

Is there a way to get that same functionality or at least notify the user where the file was saved?

Thanks. Sean.
 
To just test if it already exists, you could use the Dir() function prior to the TransferThingie, say (untested air code)

[tt]if Dir(ThePathAndNameOfFile)<>"" Then
if (msgbox("Oups - it exists, delete",vbyesno)=vbyes) then
Kill ThePathAndNameOfFile
else
exit sub
end if
end if[/tt]

- ThePathAndNameOfFile being a string varible containing path and name of file

You could also allow the user to specify name and path by for instance the methods outlined here (see, and test, the function "testit" within the code for information on usage)

Roy-Vidar
 
Thanks Roy! I'll piece this together.

Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top