I have a listbox populated with a series of queries. I am trying to write code so the user selects the query from the list and clicks and export command button.
Code:
Private Sub cmdExport_Click() Dim strQuerySelect As String Dim lstQueryBox As ListBox strQuerySelect = lstQueryList.Value DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, strQuerySelect, "C:\Documents