Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Marc
 
Posts: n/a
Default 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   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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about combining data from multiple workbooks into one rep BookOpenandUpright Excel Discussion (Misc queries) 2 February 19th 05 12:37 PM
Excel page break preview RK Excel Discussion (Misc queries) 3 February 17th 05 12:33 AM
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM
page break preview lein Excel Discussion (Misc queries) 0 December 23rd 04 10:55 AM
Cant Preview - How do I fix it? T Excel Discussion (Misc queries) 1 December 4th 04 11:09 AM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"