To Joe Fallon - tried, but no work.

J

jdtivoli

I tried running the first sample you referred me to
(http://www.mvps.org/access/modules/mdl006.htm). No
luck.
I set it up as a control button on a form in a sample
database. When I clicked on the control button, I
received and error message saying "Compile Error - Sub or
Function not defined". Then it highlights the Sub
sTestXL_Click() title.

Next I tried the following sample;
(http://support.microsoft.com/default.aspx?scid=kb;en-
us;14276 Entitled Using Automation to Create and
Manipulate and Excel Workbook) No luck here either.
I set it up exactly as the sample showed. But I received
an error saying "Compile Error - Variable not defined".
Then it highlights the next to the last line of code
which says Text1.SetFocus

Help please,

Jesse
 
J

Joe Fallon

Try putting the code from
http://www.mvps.org/access/modules/mdl0006.htm
in a Module.

Be sure to get the other download that is mentioned and place it in a module
too.

Give the modules any names EXCEPT any of the functions or subs in them!
Use Module1 and Module 2 for safety.

Then be sure to add a Reference to Excel in your code.
Tools, References.

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top