Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, hopefully someone can point me in the right direction.
I'm having trouble making a macro for a variable size print area. My code so far: Range("B8").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select ActiveSheet.PageSetup.PrintArea = "$B$8:$H$273" Range("G5").Select In the example above when i create the macro i have text in the area from B8 to H273, but if my text changes, the macro still selects this range to printarea, making the area either to big or to small. I have tried using this command from another workbook, but the results are not what I'm looking for: ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Max size of variable? | Excel Programming | |||
any variable size | Excel Programming | |||
ActiveSheet.PageSetup.PrintArea variable ? | Excel Programming | |||
Macro Creating Variable and using variable in a SQL statement | Excel Programming | |||
How to find out the size of a variable-size array ? | Excel Programming |