View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default Print page based on the value of a cell

The following macro will do that. I left the print command line for you to
fill because I have no idea what you want to print. This macro must be
placed in the sheet module of your sheet. You can access that module by
right-clicking on the sheet tab and selecting View Code. "X" out of the
module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("A1")) Is Nothing And _
Target = 1 Then
'place print code here
End If
End Sub

"Michael Lanier" wrote in message
...
If cell A1=1 as the result of a change entry, I would like the page to
print. Is there a macro that will accomplish this? Thanks for any
help.

Michael