• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • Last Modified:

vba to call a macro in access 2003

Hi expert's

I have a macro in ms access 2003 that works fine ...also have a second macro......what I want to do is call the second macro from the first macro..

Second macron is private sub cmdrunme ()
0
route217
Asked:
route217
3 Solutions
 
MAS (MVE)Technical Department HeadCommented:
Write the below command in your first macro
"Call cmdrunme"
0
 
Rgonzo1971Commented:
Hi,

If not in  the same module it shouldn't be private

pls try

Sub YourMacro1
'Your code
Call cmdrunme()

'Your code
End Sub

Open in new window

Regards
0
 
Bill RossCommented:
Hi,

In the macro use the RunCode option with cmdrunme ()

You will need to change the sub to a function and to public.

Private Sub cmdrunme()

s/b

Public Function cmdrunme()

Macros run functions not subs.

Private means they can't find them from a Macro which runs Public.

Regards,

Bill
0
 
route217Author Commented:
Apologies experts I meant to split the points can we open the question up
0
 
route217Author Commented:
Thank you experts for re opening question and apologies on my part.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now