Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2008

Tip: Looking for answers? Try searching our database.

Print from preview

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shakey - 21 Feb 2008 20:34 GMT
I have a Macro that sorts data then gives me a print preview to confirm I
agree with results, IE manually resolve ties, not common. In order to print
from that view I need to exit preview - click on excel button - select
print -  select print type - agree to printer,nr, etc - finally print.
I can not get a printer icon on the print preview window active.
Bottom line - What is the shortest way to print from print preview?
Thank you
Mel
Bernard Liengme - 21 Feb 2008 21:01 GMT
Doe this work for you?

Sub Macro1()
   ActiveWindow.SelectedSheets.PrintPreview
   myreply = InputBox("Print? Y/N")
   If UCase(myreply) = "Y" Then
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
   End If
End Sub

Signature

Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

>I have a Macro that sorts data then gives me a print preview to confirm I
>agree with results, IE manually resolve ties, not common. In order to print
[quoted text clipped - 4 lines]
> Thank you
> Mel
shakey - 21 Feb 2008 23:14 GMT
I spliced your idea in at the end of my existing one and it cuts out many
steps so it is very helpful. I still need to close preview before I can see
the input box, no big deal.
My macro:
col = InputBox("enter column letter:")
   Rows("4:40").Select
   Selection.Sort Key1:=Cells(4, col), Order1:=xlDescending,
Header:=xlGuess, _
       OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
       ActiveSheet.PageSetup.PrintArea = "$A$1:$I$40"
   ActiveWindow.SelectedSheets.PrintPreview     MY OLD END
   myreply = InputBox("Print? Y/N")
   If UCase(myreply) = "Y" Then
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
   End If

End Sub

Thank you
Mel

> Doe this work for you?
>
[quoted text clipped - 15 lines]
>> Thank you
>> Mel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.