By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

Module works, can't open it in Macro

P: n/a
CQ
I have a module, when I run it the module does exactly what I want it
to do. However, in my macro I use "OpenModule" in the action column,
and I put the module name and procedure name in there. I get no
errors, it just doesn't seem to run the module. I have tried it with
just the module name and no procedure - no difference. And, the
procedure and no module - that gives me the error that I have to have
a module.

Any thoughts or is there a different way to call the module?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
co*****@yahoo.com (CQ) wrote in news:d142ec13.0408111320.6e04ccc1
@posting.google.com:
I have a module, when I run it the module does exactly what I want it
to do. However, in my macro I use "OpenModule" in the action column,
and I put the module name and procedure name in there. I get no
errors, it just doesn't seem to run the module. I have tried it with
just the module name and no procedure - no difference. And, the
procedure and no module - that gives me the error that I have to have
a module.

Any thoughts or is there a different way to call the module?


Make the code a Public Function ...not a Sub.
Use the RunCode Action.
In Function Name enter the Function Name eg ShowTheAnswer()
Include the brackets.

Function example:

Public Function ShowTheAnswer()
MsgBox 42
End Function


--
Lyle
--
use iso date format: yyyy-mm-dd
http://www.w3.org/QA/Tips/iso-date
--
The e-mail address isn't, but you could use it to find one.
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.