VBA = Visual Basic for Applications.
It's the programming language that is used in ACCESS modules.
What you would need is a subroutine that you call in order to do the export.
Create a module (Database window | Modules | New) and name it basSubs.
Paste this generic code (not tested) into the VBE window (change generic
names to your real names) and then modify it as you need to for your setup:
Public Sub ExportingToEXCEL()
Dim xls As Object, xlWB As Object, xlWS As Object
Dim xlCell As Object
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim intF As Integer
Set xls = CreateObject("Excel.Application")
Set xlWB = xls.Workbooks.Open InputBox("Enter the " & _
"path and filename of the EXCEL file:")
Set xlWS = xlWB.Worksheets(1)
Set xlCell = xlWS.Range("A1")
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset(InputBox("Enter name of " & _
"table or query to be exported:"), dbOpenDynaset, _
dbReadOnly)
If rst.BOF = False And rst.EOF = False Then
rst.MoveFirst
Do While rst.EOF = False
For intF = 0 To rst.Fields.Count - 1
xlCell.Offset(0, intF).Value = rst.Fields(intF).Value
Next intF
rst.MoveNext
xlCell = xlCell.Offset(1,0)
Loop
End If
Set xlCell = Nothing
Set xlWS = Nothing
xlWB.Close True
Set xlWB = Nothing
xls.Quit
Set xls = Nothing
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing
End Sub