Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can i run macro when i print worksheet.
..Hi to all
When i give print command from file menu than only macro has to run. is this possible. tnk in advance ****al |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can i run macro when i print worksheet.
****al,
There is a BefdorPrint event availoable which you could add your code to. Go to the ThisWorkbook code module, select ThisWorkbook from the left dropdown, and you will find the event in the right dropdown. -- HTH RP (remove nothere from the email address if mailing direct) "****al shah" wrote in message ... .Hi to all When i give print command from file menu than only macro has to run. is this possible. tnk in advance ****al |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can i run macro when i print worksheet.
Go to VBA editor using <alt + <f11
In the "project - vba project window" double click on "this workbook" On the right side of the window click on dropdown arrow next to "general" select "workbook" click on dropdown arrow next to "open" select "Beforeprint enter the name of the macro you want to run without the Sub and without the ( ) So it should look like........... Private Sub Workbook_BeforePrint(Cancel As Boolean) macroname End Sub Regards Bill K "****al shah" wrote in message ... .Hi to all When i give print command from file menu than only macro has to run. is this possible. tnk in advance ****al |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Create Macro to Increase Cell Value to one and Print Worksheet | Excel Worksheet Functions | |||
Select Worksheet to print Macro | Excel Worksheet Functions | |||
Macro to print a selected range, not entire worksheet | Excel Discussion (Misc queries) | |||
print a specific area within a worksheet by clicking on print? | Excel Worksheet Functions | |||
Print Macro that will Print Entire worksheet except.... | Excel Programming |