Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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
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
Change Cell Width WITHOUT changing Column width dww701 Excel Discussion (Misc queries) 1 January 12th 09 10:52 PM
Excel column width stan Excel Worksheet Functions 5 August 19th 08 05:22 PM
how do I create multiple column width in the same column in excel Vish Excel Discussion (Misc queries) 9 November 3rd 06 11:49 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Excel - CSV Format and column width [email protected] Excel Discussion (Misc queries) 7 June 9th 05 07:40 PM


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