#1   Report Post  
Junior Member
 
Posts: 2
Default Print Area

Hello guys!
Can I have your help; I have an range with data A1:T20. Can you define it as print area if it contains any letters or numbers in cell G10? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,872
Default Print Area

Hi Nick,

Am Tue, 22 Jul 2014 19:25:00 +0100 schrieb Nick31:

Can I have your help; I have an range with data A1:T20. Can you define
it as print area if it contains any letters or numbers in cell G10?


in the code window of your sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) < "G10" Then Exit Sub
PageSetup.PrintArea = IIf(Len(Target) 0, "$A$1:$T$20", "")
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
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 06:23 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 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 03:11 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"