Re: How do I make all rows 7,...23 exactly 8 pixels higher ?



Odd... I replied to the OP's message which is cross-posted to two newsgroups, but my message only picked up this newsgroup to reply to. This is the first time I can recall this (a newsgroup being ignored in a reply) ever happening... I wonder why?

Rick


"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message news:ePOG%23IoOIHA.292@xxxxxxxxxxxxxxxxxxxxxxx
The height of the rows 7,..,23 is in a certain Excel *** to low.

How can I increase the height (for only these rows) by 8 pixels ?

Or more general: If I mark rows n,....,m
How can I make them x pixels (resp y millimeter) higher ?

This should work for the general case. Select the rows you want to change and then run (Alt+F8) this macro...

Sub IncreaseRowHeightsInPixels()
Dim R As Range
Dim Answer As Double
Answer = InputBox("How may pixels higher do you want?")
For Each R In Selection.Rows
R.RowHeight = R.RowHeight + Answer * 0.75
Next
End Sub

The 0.75 Pixels to Points conversion factor was obtained by calculation using the information at this web page...

http://office.microsoft.com/en-us/excel/HA010346241033.aspx

after opening up the "How is row height measured?" link at the bottom of the page. I tried setting the spread*** to different values and it seems to work. However, it is possible that there is a dependency on the screen's font size (dpi) setting (at least in the Windows world) since the 96 in the "1-inch to 96-pixel" equivalency looks suspiciously like the 96 dpi setting which is the standard for Windows (but which can be customized via the Display Panel). If you are willing to work in Points directly, simply remove the 0.75 multiplication factor and change the prompt in the InputBox function call to say Points instead of Pixels.

Rick

.