ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run macro after print command. (https://www.excelbanter.com/excel-programming/320595-run-macro-after-print-command.html)

shital shah

run macro after print command.
 
hi to all
Is there any way when i print a worksheet after print command given from
file menu it should run a macro or it should ask the name of macros which
have in module.

thanks

****al shah

No Name

run macro after print command.
 
there is a Before Print event in the worksheet module but
no after print so no you can't do that.
I would suggest that you assign your macro to a custom
icon that you can click just after print.

-----Original Message-----
hi to all
Is there any way when i print a worksheet after print

command given from
file menu it should run a macro or it should ask the name

of macros which
have in module.

thanks

****al shah
.


David

run macro after print command.
 
?B?c2hpdGFsIHNoYWg=?= wrote

Is there any way when i print a worksheet after print command given
from file menu it should run a macro or it should ask the name of
macros which have in module.


Maybe this will work:

Worksheet Module
Private Sub Workbook_BeforePrint(Cancel As Boolean)
On Error GoTo Quit
Application.OnTime Now(), ThisWorkbook.Name & "!WorkbookAfterPrint"
Quit:
End Sub

General Module
Sub WorkbookAfterPrint()
'Your code or call macro here
End Sub


--
David

David

run macro after print command.
 
David wrote

Worksheet Module


Sorry, this should be Workbook Module

--
David


All times are GMT +1. The time now is 02:04 PM.

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