Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vsn Vsn is offline
external usenet poster
 
Posts: 21
Default Print with sevral different print area's

Hi all,

I wonder would it be possible to printpreview several different print area's
after using the [Print Preview] command from the menu without always
phisicaly printing the second preview after closing [Close] it on the menu?

I now get the first area previewed, close it, get the second area previewed,
close it and than always physicaly prints no matter I press [CLOSE]

I have code like this:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'First print area
ActiveSheet.PageSetup.PrintArea = "$D$9:$I$25"
ActiveWindow.SelectedSheets.PrintPreview

'Second print area
ActiveSheet.PageSetup.PrintArea = "$A$1:$D$20"
ActiveWindow.SelectedSheets.PrintPreview
End Sub




Thx,
Ludovic


  #3   Report Post  
Posted to microsoft.public.excel.programming
Vsn Vsn is offline
external usenet poster
 
Posts: 21
Default Print with sevral different print area's

Don,

I put it like this (below) and get an error PrintPreview methode of Range
class failed........?

Private Sub Workbook_BeforePrint(Cancel As Boolean)
PPV
End Sub


Sub PPV()
Range("a1:b20").printpreview
If InputBox("do you want other") = OK _
Then Range("d20:m20").printpreview
End Sub

Did I implement something wrong?


Cheers,
Ludovic

"Don Guillett" schreef in bericht
...
Try this idea
Sub printpreview()
Range("a1:b20").printpreview
If InputBox("do you want other") = OK _
Then Range("l1:m20").printpreview
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Vsn" <vsn_hotmail_kom wrote in message
...
Hi all,

I wonder would it be possible to printpreview several different print
area's after using the [Print Preview] command from the menu without
always phisicaly printing the second preview after closing [Close] it on
the menu?

I now get the first area previewed, close it, get the second area
previewed, close it and than always physicaly prints no matter I press
[CLOSE]

I have code like this:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'First print area
ActiveSheet.PageSetup.PrintArea = "$D$9:$I$25"
ActiveWindow.SelectedSheets.PrintPreview

'Second print area
ActiveSheet.PageSetup.PrintArea = "$A$1:$D$20"
ActiveWindow.SelectedSheets.PrintPreview
End Sub




Thx,
Ludovic




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
Print and Print Preview Graphic Moving Resizing 2007/2003 Adam Rayburn Excel Discussion (Misc queries) 0 April 4th 07 04:18 PM
Macro to hide rows with a certain cell empty then set print area and print tahrah Excel Programming 12 January 9th 07 03:47 AM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook will Excel Programming 3 September 23rd 04 08:05 PM


All times are GMT +1. The time now is 11:01 PM.

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"