We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub btn_exportList_Click() Const existingFilePrompt As String = "This file already exists in folder X:\EADB\Exports\. Do you want to overwrite the file?" If Dir("X:\EADB\Exports\Agent_List_" & Format(Date, "yyyymmdd") & ".xlsx") <> "" Then MsgBox(existingFilePrompt, vbQuestion + vbYesNo) = vbNo Cancel = True Else DoCmd.OutputTo acOutputForm, "agencyListTblForm", acFormatXLSX, "F:\EADB\Exports\Agent_List_" & Format(Date, "yyyymmdd") & ".xlsx" MsgBox ("Successful Export"), vbInformation, "Transfer Complete" End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.