Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Setting print area

try
botcell & "

"nath" <n@n wrote in message ...
Hi

I am trying to write some code for a button to set the
print area of a sheet to only include the relevant data.
I have coded this so far

With ActiveSheet.PageSetup ' Set up printing
preferences

.PrintArea = "$B$2:$" & col_name & "$" & botcell
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = 2
.CenterHeader = "4 Region BAAG report"

End With

where col_name is the last column of relevant data. Which
comes from some earlier code.

When i run this i get an error message saying that the
print area can not be set.

Can any one help?

TIA

Nath.



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 Area Setting RozBuds Excel Discussion (Misc queries) 3 February 19th 10 09:41 PM
Setting The Print-Area ? Robert11[_3_] New Users to Excel 2 May 31st 09 03:24 PM
Setting print area richzip Excel Discussion (Misc queries) 1 April 27th 08 08:10 AM
setting complex print area Myrna Larson[_2_] Excel Programming 3 August 18th 03 04:37 PM
setting complex print area William[_2_] Excel Programming 0 August 18th 03 05:09 AM


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