View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default 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