running code from a macro

P

pat67

I have a VBA code to run some queries and output them to Excel.
Trouble is I am not able to get it to run from a macro. Right now I
have to go into the code and run it. How can I set it up to run from a
macro?
 
M

MGFoster

pat67 said:
I have a VBA code to run some queries and output them to Excel.
Trouble is I am not able to get it to run from a macro. Right now I
have to go into the code and run it. How can I set it up to run from a
macro?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Put the VBA code in a standard module, not a form module, and use the
Run Code macro option. Put the name of the VBA function in the Function
Name macro field.

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSjqtYoechKqOuFEgEQJY3gCfZbr9zYqDcoY0DN95ibu1fm4lwD0AoM4C
F20QESjmy3SO15QuNLY4oUF5
=M0C7
-----END PGP SIGNATURE-----
 

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