Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


print preview greyed out when printing from userform

  • Please log in to reply
No replies to this topic

#1 XML2005


  • Members
  • 129 posts
  • Gender:Not Telling
  • Local time:02:57 PM

Posted 24 September 2009 - 09:04 PM

I wrote an application in Excel 2003. When document opens, a userform is displayed. User inputs data which gets formatted to a spreadsheet to be previewed and printed. User never types directly on the spreadsheet.

In Excel 2003, it worked fine. But when I try to run my .xls file in Excel 2007, the print preview buttons are greyed out.

Here's my code, after the spreadsheet has been formatted.

Sheets(1).Unprotect Password:="mypassword"
Application.ScreenUpdating = True
' At this point, user sees Print Preview, but unfortunately cannot print the data!!!
Sheets(1).Protect userinterfaceonly:=True, Password:="mypassword"
form1.Show vbModal

Anyone ever see this problem before? Thanks for your help.

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users