I have a template that should only be used if it is for a certain ship to that ends up in a specific cell in t he workbook. I want to keep them from printing the file if the ship to does not match what I need it to match.
I have the below code in the ThisWorkbook module.
Private Sub...
I have a form that people fill out, print, and scan to me. I want to set a macro so that when they hit print, it pops up a message box that reminds them I need their cover page and calculations pages. I have read dozens of help forum posts and copied many of the codes into sample excel sheets to...
Hello,
I am a true beginner to VBA and would like some help in creating a macro that is triggered when the user goes to save the document. The document contains a check box and, if checked, cell B28 will show TRUE. If the check box is checked, the user is expected to enter additional...
Hi! I've tried trapping printing as per the thread "Workbook_BeforePrint(Cancel As Boolean) ...how about AfterPr" at http://www.mrexcel.com/forum/excel-questions/1659-workbook_beforeprint-cancel-boolean-how-about-afterpr.html.
As mentioned in the thread, the same code runs for both Print and...
Hi,
I have code in my Workbook_BeforePrint routine, but I don't want it to be executed if the event is triggered by the PrintPreview, so I can I know if the event has been raised by the PrintPreview button instead of the Print button?
Thank you
I have a workbook that by default shows 1 sheet where the user makes selections from a listbox. Once the selections are made, new sheets are created for each of them in this workbook. I have created a button that should both create and print by clicking on it. The code for this is:
Sub...
I am using the following 2 macros to change the font color from Black to White before printing and then back again once I save the file. I never could get Lenze's solution from Feb 2002 to work. Just for the record, Lenze has helped me plenty (directly and indirectly), so I'm not hating...
Dear All,
I am having trouble with Print Preview in a file with a Workbook_BeforePrint event.
I have an Excel 2003 workbook that contains VBA code. In Private Sub Workbook_BeforePrint(Cancel As Boolean) I have code that if conditional formatting is turned on in a range of cells, then:
Cancel...
I am using Excel 2007
I have this code in my ThisWorkbook Module:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").Range("B2,B5,B8,B13").Font.ColorIndex = 2
End Sub
I have this code in each Worksheet Module I want to use it for:
Private Sub...
I've exhausted my searches trying to bang this out, when I know I can solve my probably in an un-sexier manor by creating a macro that overrides CTRL+P to run spell check and then print. However, I am hell-bent on figuring this thing out.
My goal: to force excel to run spell check before I...
Hi,
I have an excel sheet which creates delivery notes. Every time a delivery note is printed, I want to track it in another sheet.
I have the following line of code linked to a button.
ActiveWindow.SelectedSheets.PrintOut copies:=5
The problem is that the below macro runs when the...
I am needing to run a macro AFTER printing. Since there is no AfterPrint, the only way to do this is to trap with Workbook_BeforePrint, cancel the automatic print/preview, code it manually and followup with the macro. (Excel 2003)
My problem now is knowing if the user chose Preview or Print...
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.