macro running sub

Joe C

Well-known Member
Joined
Oct 17, 2002
Messages
841
I wrote a macro to pull out reporting. How do I start the macro which is in module2 using the Macro screen area. All I see is runMacro which only allows me to run the macros built in the macro screen, and open module which allows me to open module2 but it does not run the macro.
Im very new to access, quite experianced in VBA in excel.
Thanks for any help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

Go into the VBA editor, and write your macro, but make it a function. In other words, instead of
Code:
sub procedure1()
, use
Code:
function procedure1()

Go to the macro tab (not the VBA editor). Select new. Select action|RunCode. Under function name type or select the name of the function you just created.

HTH,
 
Upvote 0

Forum statistics

Threads
1,221,497
Messages
6,160,152
Members
451,625
Latest member
sukhman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top