View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Pierre via OfficeKB.com[_2_] Pierre via OfficeKB.com[_2_] is offline
external usenet poster
 
Posts: 122
Default printing a range that changes all the time

Hi Ron,

I still have a little problem.
If i use your code the sheet(1) has to be unprotected.
Is there a way to have the sheet temporarily unprotect and after the code
protect again.
or
is there a way to really hide the sheet and only have it appear when this
code is executed ?
otherwise users might use ctrl-pagedown

Ron de Bruin wrote:
Hi Pierre

youy can unhide and hide in the code

Sub Print_with_Autofilter()
With Sheets("Sheet1")
.Visible = True
.Range("B7:B100").AutoFilter Field:=1, Criteria1:="<"
.PrintPreview
.AutoFilterMode = False
.Visible = False
End With
End Sub

Ron,

[quoted text clipped - 20 lines]
Thanks,
Pierre



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1