Hello again guys!
So im trying to execute a VBA code on my AutoExec macro.
This is what ive done so far:
1.) Created a module with the following code:
Option Compare Database
Option Explicit
Public Function import() As Boolean
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "Kunden", "e:\pizza program\kunden.xlsx", True
End Function
2.) Inserted "RunCode" into my macro and using "import()" as the name of the function
But it doesnt seem to want to work, when I load up the database the macro it comes up with an error message basically saying that the code has an expression which cannot be found.
Any thoughts?
So im trying to execute a VBA code on my AutoExec macro.
This is what ive done so far:
1.) Created a module with the following code:
Option Compare Database
Option Explicit
Public Function import() As Boolean
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "Kunden", "e:\pizza program\kunden.xlsx", True
End Function
2.) Inserted "RunCode" into my macro and using "import()" as the name of the function
But it doesnt seem to want to work, when I load up the database the macro it comes up with an error message basically saying that the code has an expression which cannot be found.
Any thoughts?