LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile Error: With From:= << Highlighted

And if you use .printout and add preview:=true, you'll be able to printpreview,
too.

JMay wrote:

Thanks Both Dave and Ron --
So my lastest code (see under last comm to Mike) with Q is solved
by "forgetting" the need for the To:= parameter?
Coooooooool !!!!!!!!!

"Ron de Bruin" wrote:

Hi Dave

(make 999 as big as you want to ensure that you got all the pages.)


I believe this part To:=999 is not needed if I remember correct ?

The OP can use
sht.PrintOut preview:=True, From:=2


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dave Peterson" wrote in message ...
.printout has a preview parm:

sht.PrintOut preview:=True, From:=2, To:=999

(make 999 as big as you want to ensure that you got all the pages.)

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?

--

Dave Peterson



--

Dave Peterson


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 10:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"