+ Reply to Thread
Results 1 to 12 of 12

Printpreview

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Printpreview

    Hi,
    Can you please make this code to be Sheet2 instead of the activewindow.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Hi,
    I want the printpreview for Sheet2 instead the activewindow.
    If the code can printpreview Sheet2 and close then after as a macro.

    Thanks.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Hello,
    This is what I came out with a code and it works for me but I need to add a code "close print preview".

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Let me clarify, maybe it will help the issue.

    I want the print preview in Sheet2 to wait for a 2 seconds then it will manually closed the print preview.

    Please if you can write some code to be added on this:

    End With
    With Worksheets("Sheet2").PrintPreview
    End With
    End Sub

    Thank you.

  5. #5
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Oooops... I meant automatically closed the "Print Preview"

  6. #6
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Printpreview

    Print preview suspends the code. So this is at least not a simple request, you may get no answer.

    Why do you want to do this anyway?
    You seem to be asking to show the print preview then immediately hide it?
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  7. #7
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Yes, i need the print preview to show then after a seconds will immediatelt hide it or close the print preview

  8. #8
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    This is what I have so far but Its not working.
    There is a 2 seconds but it does not automatically kill the preview.


    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Printpreview

    Yes, that is what I was saying,

    I think you will find With Worksheets("Sheet2").PrintPreview stops your code.
    As a result you never get to the next line where you are trying to send keys "escape". Not easy to get around.

  10. #10
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    will you be able to rewrite the code?

  11. #11
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Printpreview

    unless someone else has an idea -

    Maybe take a step back and think why you need this to happen.

    Maybe you just need to see the page layout or the page break preview or something like that?

  12. #12
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,750

    Re: Printpreview

    Ok.
    What about print preview and close print preview sub macro vba code? This will probably work for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PrintPreview
    By oddbjorn-j in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2017, 10:56 AM
  2. Printpreview
    By Manvinder8 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-21-2010, 12:15 AM
  3. Excel Hangs When PrintPreview
    By tqm1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2007, 08:43 AM
  4. Print or PrintPreview
    By bhofsetz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2007, 07:03 PM
  5. [SOLVED] PrintPreview Error
    By AM_137 in forum Excel General
    Replies: 0
    Last Post: 04-03-2006, 03:00 PM
  6. printpreview
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2005, 06:05 PM
  7. PrintPreview Zoom
    By CG Rosén in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2005, 12:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1