View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Compile Error: With From:= << Highlighted

Hi,

As far as I'm aware the only switches for .printpreview are True/False and
the correct syntax is

sht.PrintPreview (True)

What are you attempting to do with the switch you are using?

Mike



"JMay" wrote:

Sub PrintSkipP1()
Dim sht As Worksheet

For Each sht In ActiveWindow.SelectedSheets
sht.PrintPreview From:=2, To:=4
Next sht

Set sht = Nothing
End Sub

WHY?