Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColumnWidth
Hi
I need to set Excel;s cell ColumnWidth in pixels instead of Points. I have a picture that I need to put over the cell, for this I need to resize cell accordingly. thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColumnWidth
Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long Const LOGPIXELSX = 88 Const POINTS_PER_INCH As Long = 72 Function PointsPerPixel() As Double Dim hDC As Long Dim lDotsPerInch As Long hDC = GetDC(0) lDotsPerInch = GetDeviceCaps(hDC, LOGPIXELSX) ''Get the user's DPI setting PointsPerPixel = POINTS_PER_INCH / lDotsPerInch ReleaseDC 0, hDC End Function -- Jim "abhimanyu" wrote in message oups.com... | Hi | | I need to set Excel;s cell ColumnWidth in pixels instead of Points. I | have a picture that I need to put over the cell, for this I need to | resize cell accordingly. | | thanks | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Columnwidth | Excel Discussion (Misc queries) | |||
ColumnWidth | Excel Programming | |||
Columnwidth changes-Event | Excel Programming | |||
Selection.ColumnWidth | Excel Programming | |||
ColumnWidth not working... | Excel Programming |