Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Is there a limit on the length of a PrintArea?

Hi,

I have a worksheet that can contain anywhere from 22 to 40 embedded charts.
I am trying to create code that sets non contiguous <sp print ranges so that
each chart will print on it's own page. Each chart is 51R x 22C. When the
length of the print range string I've built exceeds 255 characters I get a RT
1004 error "Unable to set the PrintArea property....". Does anyone know of a
way around this limitation or suggest an alternative way to accomplish the
task?
--
TIA
Chuck M.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Is there a limit on the length of a PrintArea?


A different approach...

Sub PrintCharts()
Dim chtObj As Excel.ChartObject
For Each chtObj In ActiveSheet.ChartObjects
chtObj.Chart.PrintOut
Next
Set chtObj = Nothing
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Chuck M"
wrote in message
Hi,
I have a worksheet that can contain anywhere from 22 to 40 embedded charts.
I am trying to create code that sets non contiguous <sp print ranges so that
each chart will print on it's own page. Each chart is 51R x 22C. When the
length of the print range string I've built exceeds 255 characters I get a RT
1004 error "Unable to set the PrintArea property....". Does anyone know of a
way around this limitation or suggest an alternative way to accomplish the
task?
--
TIA
Chuck M.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Is there a limit on the length of a PrintArea?

Hi Jim. I like your approach. Thanks! I'd like to take this one step further
to see if each chart could be a separate page in one main document. The
charts are to be emailed to multiple receipients on a monthly basis. One
large document would be easier to handle. I know I didn't explain this in my
original post. Any thoughts?
--
Thanks.
Chuck M.


"Jim Cone" wrote:


A different approach...

Sub PrintCharts()
Dim chtObj As Excel.ChartObject
For Each chtObj In ActiveSheet.ChartObjects
chtObj.Chart.PrintOut
Next
Set chtObj = Nothing
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Chuck M"
wrote in message
Hi,
I have a worksheet that can contain anywhere from 22 to 40 embedded charts.
I am trying to create code that sets non contiguous <sp print ranges so that
each chart will print on it's own page. Each chart is 51R x 22C. When the
length of the print range string I've built exceeds 255 characters I get a RT
1004 error "Unable to set the PrintArea property....". Does anyone know of a
way around this limitation or suggest an alternative way to accomplish the
task?
--
TIA
Chuck M.

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
Criteria length limit in SUMIF() BAC Excel Worksheet Functions 16 April 29th 23 03:41 AM
setting a cell length limit jxbeeman Excel Discussion (Misc queries) 1 November 18th 08 02:03 PM
Text length limit ConfusedAsEver945 Charts and Charting in Excel 1 February 12th 08 09:31 AM
number length limit jhahes[_48_] Excel Programming 2 March 21st 06 11:19 PM
Limit text length with inputBox BigDave[_7_] Excel Programming 2 June 10th 05 07:11 PM


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