public macros

  • Thread starter Thread starter TommyBoy
  • Start date Start date
T

TommyBoy

i created a windows form that allows you to select a pay roll file, the
pay roll file has a sheet for each employee, the form lets you select
each employee you want to their sheet to. I created a macro in excel
that emails the sheet as the body and everything is working fine. My
problem is that there will be a different pay roll file for each pay
period, how do i make my macro public so any pay roll file can access
it? Thanks in advance
 
Tommy,

Macros in a standard module are b y default public, unless you explicitly
make them private. The trick is to have an argument that allows the variable
file name to be passed.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Back
Top