Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default public macros

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default public macros

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)

"TommyBoy" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default public macros

An additional method is to put your code in an addin, put it in a common
network drive and let you users select it in Tools=Addins. You would also
have code in the workbook_open event of the addin to create a toolbar to run
your macros.

http://msdn.microsoft.com/library/ba...n_addins97.htm
http://msdn.microsoft.com/library/of...exceladdin.htm
http://www.microsoft.com/exceldev/tips/addins.htm
These are about distributing applications

--
Regards,
Tom Ogilvy


"TommyBoy" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default public macros

Thanks a lot tom!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protect public sub johnny Excel Discussion (Misc queries) 2 April 23rd 08 07:04 PM
Public Password Excel 2003 - SPB Excel Discussion (Misc queries) 2 May 23rd 07 11:08 PM
Public variable Jack New Users to Excel 4 March 18th 06 09:35 PM
Public Sub Help No Name Excel Programming 2 May 18th 04 11:09 PM
public declaration kevin Excel Programming 1 December 6th 03 07:00 PM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"