Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Set print area with code

I wonder who could help me with this:

When the user clicks on a button I would like to visualise
a preview of the current page, but before I need to define
Set Print Area according to the coordinates given in four
cell (the four corners of the print area). What is the
code that will set the print area according to the
information given in four cells?

Thank you,

marc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Set print area with code

Hi

You only need 2 cells. The top left and bottom right of the print area.

Something like this.

ActiveSheet.PageSetup.PrintArea = "$C$10:$E$15"

HTH

Ken


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
Adding area codes only to phone numbers missing an area code RC Excel Discussion (Misc queries) 5 May 3rd 23 05:06 PM
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
print area across the freeze panes area tom Excel Worksheet Functions 2 January 6th 07 05:23 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 07:03 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"