LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting column width

He everyone.

After entering text in columns B,C,E, I want to set the width of column D so
that the sum of columns B:E = 4 inches (for printing purposes).

Right now I have this code:
Columns("B:C").EntireColumn.AutoFit
Columns("E").EntireColumn.AutoFit
TempCW = ActiveWindow.PointsToScreenPixelsX(Columns("B:C"). Width +
Columns("E:E").Width)
'Columns("D").ColumnWidth =
ActiveWindow.PointsToScreenPixelsX(Application.Inc hesToPoints(4) -
Round(TempCW))

Right now, column D ends up way too wide. I think I might be getting mixed
up because there are inches, pixels, and .ColumnWidth (which doesn't equal
anything else).

NOTE: I remember seeing something in the help section about resolution.
This macro will be run on different computers with different resolutions.

One last thing. The firewall at work won't run Java, so I am submitting
this during my lunch hour at home. Could you e-mail any responses to me at
work: .

Thanks, Brad E.
 
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
Setting column width to specific row in Excel doc ??? Thanks! Setting column width to specific row Excel Discussion (Misc queries) 2 July 8th 09 02:07 AM
setting column width James Excel Discussion (Misc queries) 1 July 11th 08 12:02 AM
Setting column width in a table Box815 Excel Discussion (Misc queries) 4 October 11th 06 06:34 AM
Setting column width for blank columns gmr7 Excel Discussion (Misc queries) 0 January 17th 06 03:16 PM
Setting Column Width on Imported Data B.C.Lioness Excel Discussion (Misc queries) 0 May 16th 05 09:41 PM


All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"