Export to excel

timpepu

Registered User.
Local time
Today, 13:24
Joined
Nov 6, 2009
Messages
22
Hi !
How I can export to excel by selecting place an file name , I want that access ask path and filename ?

I have done this but it work only if there is a excel file name !

Private Sub Komento5_Click()
'Function exportXL()

Dim stDocName As String
DoCmd.SetWarnings False

stDocName = "warrant NettoarvontilitysKysely"
DoCmd.OpenQuery stDocName, acNormal, acEdit


DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"Nettoarvo", "h:\mydata\warrant\Nettoarvo.XLS", True, ""
End Sub
 
Look at "DemoQryToXlsPathA2000.mdb" (attachment, zip)
Open form and try.
 

Users who are viewing this thread

Back
Top Bottom