+ Reply to Thread
Results 1 to 10 of 10

Crash on Print Preview

  1. #1
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Crash on Print Preview

    Hi,

    This file contains the printing options of a larger userform. But I am having problems with the print preview crashing.

    I'd click one of the printing options on the userform, this would bring up the print preview of that sheet.

    And when I try to "test" its stability by going crazy on the view next/ previous page on preview, it'd crash. This is especially when I've got the screenupdating set to false.

    Just wondering if anyone else can varify the crash/ suggest what maybe its cause?
    Last edited by Ttotal; 03-11-2009 at 01:40 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Crash on Print Preview

    Do you hide the UserForm before displaying PrintPreview?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Crash on Print Preview

    No,

    Here's an extract of the code:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Crash on Print Preview

    Try this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Crash on Print Preview

    Sorry, yes I do hide the userform first before print preview. Am I not supposed to?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Crash on Print Preview

    I see what's happening. Try this to replace the existing code
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Crash on Print Preview

    sorry to report that the problem still exists with your suggested code.

  8. #8
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Crash on Print Preview

    Colpied the entire workbook into a new one - some reason it seems to have solved the problem.

    Thanks.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Crash on Print Preview

    Quote Originally Posted by Ttotal View Post
    sorry to report that the problem still exists with your suggested code.
    Yur uploaded workbook worked perfectly after I changed the code as above.

  10. #10
    Registered User
    Join Date
    02-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Crash on Print Preview

    Quote Originally Posted by royUK View Post
    Yur uploaded workbook worked perfectly after I changed the code as above.
    Yep, it works well now. Since then I coded the "close active worksheet" into the SortPrint sub to save a few extra lines.

    Also changed the "application.goto" to .select to simplify the code. But thats the difference between two oranges really.

    Again, thanks for the suggestions.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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