Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
Is there anyway for me to have a macro run automatically whenever an action is done on Excel? For example, could I set up a macro that saves the file to automatically run whenever I print? -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
You can trap events and fire your macro from there. For instance, there is a
BeforePrint event. See http://www.cpearson.com/excel/events.htm, it says Excel97 but it is still valid. -- HTH Bob Phillips "Losse" wrote in message ... Is there anyway for me to have a macro run automatically whenever an action is done on Excel? For example, could I set up a macro that saves the file to automatically run whenever I print? -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
How would I get it to run automatically as soon as an event occurs? doubt this would work, but could I do something with a similar ide to: If Workbook_BeforePrint = true Then Call "SaveMacro" End I -- Loss ----------------------------------------------------------------------- Losse's Profile: http://www.excelforum.com/member.php...fo&userid=2481 View this thread: http://www.excelforum.com/showthread.php?threadid=38613 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
No it would be something like
Private Sub Workbook_BeforePrint(Cancel As Boolean) Call "SaveMacro" End Sub Read the link I gave you. -- HTH Bob Phillips "Losse" wrote in message ... How would I get it to run automatically as soon as an event occurs? I doubt this would work, but could I do something with a similar idea to: If Workbook_BeforePrint = true Then Call "SaveMacro" End If -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
Sorry, meant
Private Sub Workbook_BeforePrint(Cancel As Boolean) Call SaveMacro End Sub -- HTH Bob Phillips "Bob Phillips" wrote in message ... No it would be something like Private Sub Workbook_BeforePrint(Cancel As Boolean) Call "SaveMacro" End Sub Read the link I gave you. -- HTH Bob Phillips "Losse" wrote in message ... How would I get it to run automatically as soon as an event occurs? I doubt this would work, but could I do something with a similar idea to: If Workbook_BeforePrint = true Then Call "SaveMacro" End If -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
Thank you. Is there also an event that happens before a macro is run or the macro screen is selected? -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
Which macro, yours or the BeforePrint event?
-- HTH Bob Phillips "Losse" wrote in message ... Thank you. Is there also an event that happens before a macro is run or the macro screen is selected? -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
I was referring to when the user goes to tools.macro. Is there an even before the choices of the macros to select appears -- Loss ----------------------------------------------------------------------- Losse's Profile: http://www.excelforum.com/member.php...fo&userid=2481 View this thread: http://www.excelforum.com/showthread.php?threadid=38613 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting a Macro when Command is Executed?
No.
-- HTH Bob Phillips "Losse" wrote in message ... I was referring to when the user goes to tools.macro. Is there an event before the choices of the macros to select appears? -- Losse ------------------------------------------------------------------------ Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813 View this thread: http://www.excelforum.com/showthread...hreadid=386133 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro get executed twice | Excel Discussion (Misc queries) | |||
require password each time a macro is executed | Excel Programming | |||
Starting with command | Excel Programming | |||
Parameter Query executed from a Macro | Excel Programming | |||
Macro not executed Excel -- PowerPoint | Excel Programming |