+ Reply to Thread
Results 1 to 3 of 3

Checkboxes disappear after print preview

  1. #1
    Registered User
    Join Date
    03-30-2010
    Location
    Canada
    MS-Off Ver
    Excel 2000
    Posts
    5

    Checkboxes disappear after print preview

    I've got a strange problem... On the first sheet in my workbook (basically the "cover page"), I have several VB Checkboxes to indicate which sheets are displayed. If the checkbox is checked, the related sheets are shown, unchecked, they are hidden.

    This is one of the simpler cases, but here is some sample code (other buttons hide more than one sheet, or hide the sheet based off the name in cases the number of sheets is dynamic):

    Please Login or Register  to view this content.
    That works great. The strangeness starts after a print preview when one of the checkboxes was the last item selected. If the last action was to check a checkbox (but not uncheck -- things work fine then!) before clicking "File --> Print Preview" then "Close" all the checkboxes except the one that was active when doing the print preview disappear.

    If I remove all the code for the checkboxes the problem disappears. Adding it back for even one checkbox causes the problem to return. If I create a completely new workbook, add in a pile of blank sheets and then add in some checkboxes and apply the same macros I don't have the problem.

    Personally, I think the chances of someone having this happen to them when the form is in use is pretty slim (considering the exact conditions that must be met for it to happen), but my users want to dummy-proof this as much as possible (I have added buttons to add in a new line on some of the sheets).


    I am in a strictly controlled environment running Excel 2000, so I wouldn't be surprised if the problem stems from that. Anyone have any ideas, or do I tell my users they are out of luck?

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Checkboxes disappear after print preview

    This is a wild stab in the dark, but if you go to the Format Control -> Properties Box, is Print object box checked?

    It would help if you upload your workbook, minus any sensitive data.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    03-30-2010
    Location
    Canada
    MS-Off Ver
    Excel 2000
    Posts
    5

    Re: Checkboxes disappear after print preview

    The checkboxes disappear after closing the print preview. They show up on the preview. Sorry if that wasn't clear .

+ 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