Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Printi preview question?
On worksheet, I have few hidden rows which I unhide through VBA
clicking on a button. Also on worksheet I have set print area, so when I click on a button, rows becomes unhidden and prints. After printing, rows becomes hidden again. Is it possible that when I click on Print preview, that rows also unhide and after Closing Print preview becomes hidden again. Like Before PrintPreview event. Thanks in advance |
#2
|
|||
|
|||
Hi Marc
I think trapping the print or print preview event in excel would be difficult. I give you a simpler solution. Suppose Row no. 2, 4, and 6 are hidden. So before firing the print. Go to tools - Macr0 - Record macro. Now you unhide the rows, go to print preview, print the document and then come to normal view and again hide the rows. After this you stop recording the macro. A new macro is created and saved. Next time when you need to do the same thing you just run this macro and your task is done. In case the number of hidden rows vary everytime then you need to go to the visual basic editor and modify the code to include all hidden rows. I hope the above solves ur problem Regards Raj "Marc" wrote: On worksheet, I have few hidden rows which I unhide through VBA clicking on a button. Also on worksheet I have set print area, so when I click on a button, rows becomes unhidden and prints. After printing, rows becomes hidden again. Is it possible that when I click on Print preview, that rows also unhide and after Closing Print preview becomes hidden again. Like Before PrintPreview event. Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question about combining data from multiple workbooks into one rep | Excel Discussion (Misc queries) | |||
Excel page break preview | Excel Discussion (Misc queries) | |||
An easy macro question and one I believe to be a little more diffi | Excel Worksheet Functions | |||
page break preview | Excel Discussion (Misc queries) | |||
Cant Preview - How do I fix it? | Excel Discussion (Misc queries) |