Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Paul Robinson" wrote
Should be adaptable though? Paul, Have found a small bug in your function that you might like review. It relates the ActiveSheet.UsedRange.Width property returning the number of Points to the top left of the last cell in the range - ie. it does not include the width of this last column (or height of the last row). The mod'ed code now looks like .... ' Get the visible range in points - ensuring it rounds up With ActiveSheet.UsedRange lngUsedWidth = CLng(.Width + .Columns(.Columns.Count).Width + 1#) lngUsedHeight = CLng(.Height + .Rows(.Rows.Count).Height + 1#) End With I suspect this will work even if the last column or row is hidden because Excel reports the Width or Height of such columns/rows as 0 points. As Agent 86 would have said its the "old top left corner mentality yet again"! Not a very intuitive arrangement although it is consistent - and too late to change Excel now. Regards, Frank. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
No zoom to page option ??? | New Users to Excel | |||
Page layout - page setup - items disabled | Excel Discussion (Misc queries) | |||
FORMAT EXCEL WORKBOOK (PAGE SETUP) ALL AT ONCE INSTEAD OF BY PAGE | Excel Discussion (Misc queries) | |||
HOW DO I SETUP A PAGE IN EXCEL TO GIVE TOTALS TO ANOTHER PAGE | Excel Worksheet Functions | |||
Under Page Setup the page option of Ledger - for Office XP | Excel Discussion (Misc queries) |