print

npiere

New Member
Joined
Sep 4, 2002
Messages
2
I have a print button on my worksheet I want to be used, so is it possible to disable the print option on the file menu and the Ctrl-P option?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You could copy the code assigned to your print button to the Workbook_BeforePrint procedure. Then it won't matter whether the user clicks your button or prints normally.
 
Upvote 0
Is this about printing a "hidden" sheet?

I have also intended to force user to use a button of my design, not the stock printing routines.

That was all about printing a sheet not visible to the user, not visible to Excel.

I gave up on disabling/hiding the stock Excel icon/menu selection. Because hiding those will drive the user CRAZY.

Consider accomplishing your goal another way:

In WorkBook_BeforePrint, test for ActiveSheet.Name, or ActiveSheet.CodeName.

If user is attempting to print the "wrong" sheet, set Cancel to True, pop up a MsgBox to inform the user of the error in their ways.


The way I am now meditating on is this:

DON'T CREATE A HIDDEN SHEET, AND EXPECT TO PRINT IT WITHOUT A LOT OF GRIEF.

I asked myself the following question:
Am I using more than half the columns? No, I wasn't. Not even ten percent of columns

I am already manipulating PrintArea, if I set PrintArea to the area I am preparing/formatting, AND that area is on the visible sheet, that keeps the user, and Excel, contented, not confused.

If this sounds like a technique to investigate, let me know. I will continue with the topics of ScrollArea, and how Locked cells/Protection figure in on my plan.




_________________
This message was edited by stevebausch on 2002-10-12 11:22
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top