473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Module works, can't open it in Macro

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
1 1939
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lumpierbritches | last post by:
I have code I'm using repeatedly in my program, and would like to convert it to a module or macro, can anyone assist me? Thank you in adavance for all assistance, it is greatly appreciated. Dim...
4
by: jim_zoeller | last post by:
I am experienced with databases and sql, but lacking in vba skills. I need to write a module to delete all records from a specified table and then append records to this table from another table. I...
0
by: jpodesta | last post by:
Hello- I am fairly new to MS Access and would like to use some macros in .xls in an Access Module. I have tried to do this on my own but failed to make it work. I have included the xls macros...
4
by: jpodesta | last post by:
I would like to add the xls macros below to the module listed. I am looking for advice as to the best way to go about this. module Public Function clean_pn(pn_in As Variant) As String
17
by: Pam Ammond | last post by:
I need to use Microsoft Access Automation within a Visual Studio 2003 program written in C# for Windows Forms. When a button is clicked in my VS.NET program, I want it to run a Microsoft Access...
2
by: tonytony24 | last post by:
Hi All: I was wondering if there's a simple way to call a MS Access Module through either Command Prompt MS Script any other way... Thanks for the response.
0
by: John Phelan-Cummings | last post by:
In the process of polishing up my (last) beta application; I have been exploring all the possible ways of speeding up my forms. I realized that numerous a forms under various application...
2
by: Cele Balser | last post by:
Hello, This can't be that hard! Could someone give me the code to run a macro in my Personal.xls from my Access module? I have created a query in Access, exported it to a network drive, I can open...
1
MitchR
by: MitchR | last post by:
Good Morning Folks; I have a question that is pretty far fetched but here goes nothing... I am looking to find a way to insert a macro into an Excel command button located in an Access VBA...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.