Hi Guys,
I have this code below which works fine and sends an Excel spread sheet to the users desktop.
Cheers
I have this code below which works fine and sends an Excel spread sheet to the users desktop.
However I want to be able to use this code to work for any client and therefore need a universal bit of VBA in the below line of code to work on any PC without having to ask the client for their path file.DoCmd.SetWarnings False
DoCmd.OpenQuery "QryBristolj"
DoCmd.SetWarnings True
Dim strFullyQualifiedFilename As String
strFullyQualifiedFilename = "C:\Users\User\Desktop\End Of Month.xlsx"
DoCmd.TransferSpreadsheet acExport, , "QryBristolj", strFullyQualifiedFilename
MsgBox "File has been exported to your desktop" & strFullyQualifiedFilename
End Sub
Hope that makes sense and can anyone help.strFullyQualifiedFilename = "C:\Users\User\Desktop\End Of Month.xlsx"
Cheers
