I have created a form with a command button that has the following code:
Private Sub cmdXL_Click()
Call CreateExcelChart
End Sub
There is a module called CreateExcelChart. The module is public and should be run when you click on the command button.
The following error message appears after clicking on the button:
Compile Error:
Expected variable or procedure, not module
When the module is run directly the following error message appears:
-2147217900: Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', OR 'UPDATE'.
I copied the code from a sample database and changed the query name to match my query.
Any ideas??
Private Sub cmdXL_Click()
Call CreateExcelChart
End Sub
There is a module called CreateExcelChart. The module is public and should be run when you click on the command button.
The following error message appears after clicking on the button:
Compile Error:
Expected variable or procedure, not module
When the module is run directly the following error message appears:
-2147217900: Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', OR 'UPDATE'.
I copied the code from a sample database and changed the query name to match my query.
Any ideas??