PDA

View Full Version : Excel 2007 Buttons in Print Preview Disabled



joshtaylor
07-13-2008, 07:45 PM
G'day guys, have been having troubles with Excel 2007. I have a button on a form which hides the form then print previews a sheet then shows the form again.



Sub CommandButton1_Click()
me.hide
sheet1.printpreview
me.show
End Sub


The problem is all the buttons in print preview are disabled! So I can't print the sheet or anything the only thing I can do is close the print preview down by clicking the x in the top right corner.

This only happens when I load the form when the workbook is opended eg


Sub Workbook_Open()
userform1.show
End Sub


If I remove this code and manually run the userform after I have opened the workbook it works perfect. All the buttons are enabled and clickable. It also works if I put a button on a sheet and have it show the userform when clicked. But I need to load the form automatically when the workbook is opened not by manually running it or clicking a button to open it etc.

Anyone have any ideas? Anyone having this problem as well.


Thanks