Change page orientation to suit selection

L

Liz

I have a macro to quickly print the selection. In order to get the maximum
sized print, I would like to change page orientation to maximise it. Is
there any way to find the size of the selection so I can get the height /
width ratio?
 
J

JLGWhiz

You might not have ever noticed, but the row height and column width in
Excel are not measured to the same standard. Don't ask me why, because I
don't know other than two different people came up with the idea of how to
measure them. The standard row height is 12.75 and the standard column
width is 8.43, yet when you look at the worksheet, it is obvious that the
standard width is much greater than the standard height. So trying to
calculate the ratio of the height to width of a range would require some
tricky math. You could try to convert to pixels, but I do not know how to
tell you where to begin in doing that.
The other problem is that since the height and width of rows and columns can
vary based on content, there is no way to accurately compute those
variations.

My solution to such a dilemma would be to design my project so that I know
in advance when I need to change orientation and to build that into my
original plan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top