ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using different print code (https://www.excelbanter.com/excel-programming/296738-using-different-print-code.html)

mark

Using different print code
 
I've got a file in excel 97 that I need people to print
out using a different print macro that I created
otherwise, the form won't print correctly.

What I'd like to be able to do is disable the print
button on the standard toolbar and the "Print..." option
from the FILE menu.

This way, they would have no other choice but to use my
own macro to print.

But, I want to disable these two things only for this one
particular file, not as a global setting.

Any takers?

Any help would be greatly appreciated.

Thanks

Mark

DSC[_14_]

Using different print code
 
Hi Mark

I don't Know how to remove them but if you only want printing from you
own macro.

You could investigate the Event

Private Sub Workbook_BeforePrint(Cancel As Boolean)

End Sub

If you set the Argument Cancel = True then Excel won't Print.
You could set up a Public Variable such that only when your macro run
when this Event triggers it wont halt your printing.

HTH

Davi

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:20 AM.

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