ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Triggering Macros (https://www.excelbanter.com/excel-programming/351640-triggering-macros.html)

Sloth

Triggering Macros
 
I am very new to macros, but I have written several and mapped them to
buttons. I have seen some sample code that is triggered when the user saves,
or doubleclicking etc. Does anybody have a good reference on how to do this,
and what can be triggered?

In particular I want to know how to trigger a macro when the users saves,
and when they print (different macros for each trigger).

Don Guillett

Triggering Macros
 
Look in the ThisWorkbook module (right click the excel icon in the upper
left of the screen). In the left window select workbookin the right window
are your events.

--
Don Guillett
SalesAid Software

"Sloth" wrote in message
...
I am very new to macros, but I have written several and mapped them to
buttons. I have seen some sample code that is triggered when the user
saves,
or doubleclicking etc. Does anybody have a good reference on how to do
this,
and what can be triggered?

In particular I want to know how to trigger a macro when the users saves,
and when they print (different macros for each trigger).




Norman Jones

Triggering Macros
 
Hi Sloth,

For an introduction to event macros, which is what you are referring to, see
David Mcritchie's Events page at:

http://www.mvps.org/dmcritchie/excel/event.htm

For an in depth discussion of Event procedures see Chip Pearson's Events
page at:
http://www.cpearson.com/excel/events.htm

Specifically, look at the Workbook's Before_Save and Before_Print events.


---
Regards,
Norman



"Sloth" wrote in message
...
I am very new to macros, but I have written several and mapped them to
buttons. I have seen some sample code that is triggered when the user
saves,
or doubleclicking etc. Does anybody have a good reference on how to do
this,
and what can be triggered?

In particular I want to know how to trigger a macro when the users saves,
and when they print (different macros for each trigger).





All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com