Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re : Excel – Width of a Column and PointsToScreenPixelsX
Re : Excel – Width of a Column and PointsToScreenPixelsX
1. Say, set a worksheet column width to 50. 2. By clicking the right hand side border of the column in the heading, it shows 355 pixels. 3. The method, PointsToScreenPixelsX, computes the column width to be 294 pixels. 4. Please enlighten upon the discrepancy as shown. 5. The following code may illustrate :- Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim Msg As String ActiveCell.ColumnWidth = 50 Msg = "The width of the selected cell may be " & ActiveWindow.PointsToScreenPixelsX(ActiveCell.Widt h) & " pixels." & Chr(10) Msg = Msg & "However, by clicking the right hand side border in the column heading," & Chr(10) Msg = Msg & "it shows 355 pixels." MsgBox Msg End Sub 6. Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Cell Width WITHOUT changing Column width | Excel Discussion (Misc queries) | |||
Excel column width | Excel Worksheet Functions | |||
how do I create multiple column width in the same column in excel | Excel Discussion (Misc queries) | |||
How to make cell width different than the column width it lies in | Excel Discussion (Misc queries) | |||
Excel - CSV Format and column width | Excel Discussion (Misc queries) |