Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Problem - Print Preview
Is it possible for excel to run a macro whebn i close Print Preview?
A macro runs to go to print preview to modify row height to fi contents to page and I want to excel to run amacro to return them t original size when i close the print preview! Is this possible to do? Any help would be useful! Thanks Carl Jone -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Problem - Print Preview
Carl,
You can't do it for Print Preview exclusively. You can use the BeforePrint event of the Workbook, but this executes for both printing and print preview. Sadly, there is no AfterPrint event, so you can't restore the settings you change in BeforePrint. Put the following code in the ThisWorkbook code module. Private Sub Workbook_BeforePrint(Cancel As Boolean) ' your code here End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "carljonesuk " wrote in message ... Is it possible for excel to run a macro whebn i close Print Preview? A macro runs to go to print preview to modify row height to fit contents to page and I want to excel to run amacro to return them to original size when i close the print preview! Is this possible to do? Any help would be useful! Thanks Carl Jones --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page Preview/Print Problem | New Users to Excel | |||
Print Preview Problem in Excel | Excel Discussion (Misc queries) | |||
print/preview problem before saving an edited excel worksheet | Excel Discussion (Misc queries) | |||
Problem w/Print Preview since upgrade to office 2003 | Excel Discussion (Misc queries) | |||
print preview v page break preview | Excel Discussion (Misc queries) |