Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default range, format, file size

I am trying to format all cells with data in an excel document.

if i do this:

Set r = oSheet.Range("A1").CurrentRegion

....any blank rows in the spreadsheet end the "CurrentRegion", so data below
the blank row is not formatted.

and if i do this:

Set r = .Range(.Range("A1"), .Cells(65536,
..Range("IV1").End(xlToLeft).Column).End(xlUp))

....the entire worksheet gets formatted correctly, but the size of the saved
excel file is huge.

any suggestions for a better way to format all cells with data in a
spreadsheet OR is there a way to save an excel file while dumping extra info
in "blank cells".


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default range, format, file size

I'd use
osheet.usedrange
to determine the cells that are in use.

Or format entire columns.

www051906 wrote:

I am trying to format all cells with data in an excel document.

if i do this:

Set r = oSheet.Range("A1").CurrentRegion

...any blank rows in the spreadsheet end the "CurrentRegion", so data below
the blank row is not formatted.

and if i do this:

Set r = .Range(.Range("A1"), .Cells(65536,
.Range("IV1").End(xlToLeft).Column).End(xlUp))

...the entire worksheet gets formatted correctly, but the size of the saved
excel file is huge.

any suggestions for a better way to format all cells with data in a
spreadsheet OR is there a way to save an excel file while dumping extra info
in "blank cells".


--

Dave Peterson
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
File Size With Macros Has Increased From Its Origina Size Fred Excel Discussion (Misc queries) 1 April 26th 08 12:24 AM
Size Matters - minimizing file size [email protected] Excel Programming 1 April 23rd 07 04:26 PM
how to set sheet size to reduce file size LJ Excel Discussion (Misc queries) 1 November 26th 06 02:35 AM
Save a range to binary file (including its format) Cool Sport Excel Programming 1 January 7th 05 01:12 PM
How to get the size of the excel file, a sheet size (in bytes)? bookworm98[_13_] Excel Programming 1 January 28th 04 02:59 PM


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