View Single Post
  #4   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,

I look to be corrected but I'm fairly sure you can only preview all pages.
printout is different you can do this

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

Mike

"JMay" wrote:

Thanks Mike,
Actually, I'm trying to create a Macro that will Skip the printing of my
Page 1 of my Active 4 page printout (print only 2,3 and 4). For testing I
always use the Preview option versus PrintOut (to save paper). Also - I
actually want the To:= to be To:=[Pages] representing print to the last
page (whatever number that is)...
Thanks,
Jim


"Mike H" wrote:

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?