View Single Post
  #2   Report Post  
Raj
 
Posts: n/a
Default

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