Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to print a cell range
I need to create a Macro to select a print area and then print. This range
will change as more data is added. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to print a cell range
We need a lot more info to create a macro. Perhaps there is an easier way.
The print area for a worksheet is stored as a locally defined named range called Print_Area. You can change the print area by changing the range specified in this named range. Here is where it gets interesting. You can change the print area dynamically by making the named range Dynamic. There is an excellent explanation of dynamic named ranges on Chip Pearson's website but the site is down at the moment... google for it later and you should be able to find how it works... So if you change Print_Area to something like =Offset(A1, 0,0, counta(A:A), counta(1:1)) then the print range will adjust as more data is added... -- HTH... Jim Thomlinson "Tamsyn" wrote: I need to create a Macro to select a print area and then print. This range will change as more data is added. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to print a cell range
This will print A1:X(lastusedrow of column A):
Option Explicit Sub testme() Dim LastRow As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row .Range("a1:x" & LastRow).PrintOut preview:=True End With End Sub Tamsyn wrote: I need to create a Macro to select a print area and then print. This range will change as more data is added. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
print out specified range in macro | Excel Discussion (Misc queries) | |||
Macro print range not dynamic like I wanted it to be | Excel Worksheet Functions | |||
Macro to print a selected range, not entire worksheet | Excel Discussion (Misc queries) | |||
Macro to set print range | New Users to Excel | |||
Print range macro | Excel Discussion (Misc queries) |