Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, it seems to have worked. It's too bad that the method of hiding
unused rows & columns didnt work (it misses objects/charts, etc), because that REALLY cut down on wasted space & page count. Oh well, ya cant have everything. Thanks for the help though! ~arawn Dave Peterson wrote in message ... What happens if you just reset the last cell, then reset the print range (not specifying the address at all)? Option Explicit Sub testme01() 'Dim strLCell As String With ActiveSheet .UsedRange 'reset last cell 'strLCell = .Cells.SpecialCells(xlCellTypeLastCell).Address 'get last cell address .PageSetup.PrintArea = "" 'set the print area End With End Sub Arawn wrote: I need to set print areas on Excel sheets automatically. I will never know what a sheet will contain, but I do need to be able to set the print areas. I have tried a variety of methods, but have not had the desired results: With ActiveSheet .UsedRange 'reset last cell strLCell = .Cells.SpecialCells(xlCellTypeLastCell).Address 'get last cell address .PageSetup.PrintArea = "$A$1:" & strLCell 'set the print area End With This method doesn't recognize charts/graphs/objects apparently. I also tried hiding unused columns/rows (as described on J-Walk.com) but that didnt seem to work either. Any help would be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print Area Setting | Excel Discussion (Misc queries) | |||
Setting The Print-Area ? | New Users to Excel | |||
Charts - Setting Data Area as a Variable | Charts and Charting in Excel | |||
Setting print area | Excel Discussion (Misc queries) | |||
setting complex print area | Excel Programming |