LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to find Used Range and Print Area?

Originally, I was using the following statement to copy an image of a
worksheet, so that the worksheet information can be displayed as read-only
to the user:

SourceWorksheet.UsedRange.CopyPicture

(The reason we use this esoteric approach is because we're not in control of
the source document. We don't know what protection may already be applied.
We don't know what information or widgets are contained within the
worksheet. We're just given a worksheet of unknown origin and we need to
display it as read-only to the user.)

We found however, that this doesn't result in a faithful image of the
underlying worksheet: The following is much more effective:

SourceWorksheet.UsedRange.CopyPicture XlPictureAppearance.xlScreen,
XlCopyPictureFormat.xlBitmap

However, the xlBitmap format must be much more intensive than the xlPicture
format. I'm finding that with huge worksheets (i.e the worksheet developer
has placed information, somethimes just background coloring, down to a
ridiculous right/bottom corner) this take a looooong tim to accomplish.
However, in all of these cases, the user has set a more reasonable print
area. So here's what I'd like to do.

1. Figure our what range is actually represented by UsedRange
2. If this exceeds a defined threshold, figure out the range represented by
PrintArea.
3. If this still exceeds the defined threshold, then I'll just use the free
Excel Viewer to display the document.

If you can tell me how to convert these two 'logical' ranges, UsedRange and
PrintArea to defined cell coordinates, I'll be able to give this a shot.

Thanks for your help!

- Joseph Geretz -


 
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 as dynamic range? Michael.Tarnowski Excel Worksheet Functions 1 March 8th 09 04:02 PM
Range = print area? to unhide rows. StargateFan[_3_] Excel Programming 3 February 24th 06 12:10 PM
Find print area enginguven Excel Discussion (Misc queries) 1 January 12th 06 01:54 AM
Print area/range Mike D. Excel Discussion (Misc queries) 2 June 30th 05 07:07 PM
Find Used area of a range MDW[_2_] Excel Programming 2 February 18th 04 02:08 AM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"