Max worksheet exent width

  • Thread starter Thread starter Chet Shannon
  • Start date Start date
C

Chet Shannon

Does anyone know what command one would use to determine
the current actual maximum width extent of an Excel
worksheet? What I mean is I want to know how wide is the
widest part of the active worksheet so that I can
then "set the print area" appropriately so that the
active sheet won't be split into two pages when I print
it. (I have data that comes in varying formats that I
can't always control format wise.)

Thanks,
Chet
 
Thanks.. I realize that but if I assume I have a certain
printer setting and alignment I still need to be detect
how wide across and how tall vertically the data is on
the worksheet and that is what I don't current know how
to find out. What is the current max width and height
extent of the active worksheet?

Thx, Chet
 
Chet,

Not sure if this helps, but could you programatically delete the print area
and set it to print only one page wide?

hth,

Doug Glancy
 
Hi

are you printing eeverything on the sheet: you need to use the code to find
the "last cell" (do a Google search on the ng) and then you can deduce the
width by adding col widths. It is a little trickier if you have test
overflowing n the RHS of the spreadsheet (numbers don't, of course)

Pl explain more if I have misunderstood.

hth

Tim
 
Hi,
Yes I am printing everything on the worksheet. I will
try the search on google.. .. Thx Chet
 
The psuedo code might be like this:

Just set the active print range to the size of your data.. or the cells that
are non blank, then set this print area to fit 1 page wide to 1 page tall.
You could write a macro that checks the Row and Column's Used.Count Range for
Last used row or column to find the end. And set the print area to
$Row.Used.Count:$Column.Used.Count.

Dennis
Dalejrstwin.
 
Back
Top