I think i'm getting closer. I am getting a "compile error" message
"User dfined type not defined" with this line "highlighted Dim XLApp As Excel.Application"
Option Explicit
Private Sub cmd_qry_export_Click()
Dim XLApp As Excel.Application
Dim XLwkbk As Excel.Workbook
Dim a As String
Set XLApp...
Sorry to be such an idiot on this but I keep getting an error message.
this is how I have it:
Private Sub Toggle20_Click()
Private Sub cmd_qry_export_Click()
Dim XLApp As Excel.Application
Dim XLwkbk As Excel.Workbook
Dim a As String
Set XLApp = New Excel.Application
a = "masterma"...
I am new to vba, not sure how to create codes or functions and how to execute them.
I am trying to create a macro or a function that will (at the click of a button in a form) export a query to excel with the file name and todays date.
I found this and created a module, but I don't know how to...