Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protect public sub | Excel Discussion (Misc queries) | |||
Public Password | Excel Discussion (Misc queries) | |||
Public variable | New Users to Excel | |||
Public Sub Help | Excel Programming | |||
public declaration | Excel Programming |