Hi All,
I have a button on a form which exports a query to excel.
i want to be able to give the user a prompt as to where the file should be saved instead of having it fixed in the code.
here's what im using...
i want the user to be able to slect the save location. can anyone point me in the right direction??
Thanks.
I have a button on a form which exports a query to excel.
i want to be able to give the user a prompt as to where the file should be saved instead of having it fixed in the code.
here's what im using...
Code:
'check file already exists and if so then delete it.
pth = GetXcelPath & "Known Issues Export.xls"
FileSystem.Dir pth
If pth = Dir(pth) Then
FileSystem.Kill pth
End If
'output to excel
DoCmd.OutputTo acOutputQuery, "query1", acFormatXLS, pth 'Enter table/query to be sent to excel
'open excel file
OpenSpecific_xlFile (pth)
i want the user to be able to slect the save location. can anyone point me in the right direction??
Thanks.