Thread
:
Setting Print Area
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Setting Print Area
for one column to the right
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
Range(Cells(1, Target+1), Cells(10, Target+1)).PrintPreview
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Don Guillett" wrote in message
...
Right click sheet tabview codeinsert this. Now when you change cell a1
the column range will print automatically. After testing change
printpreview to printout
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
Range(Cells(1, Target), Cells(10, Target)).PrintPreview
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Mike" wrote in message
...
Hi,
Is it possible to set/reset the print area according to a cell value?
e.g.:-
if A1 = 1 then set print area to B1:B10
if A1 = 2 then set print area to C1:C10
etc.
TIA
Mike
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett