ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform - CommandButton_Click question (https://www.excelbanter.com/excel-programming/276363-userform-commandbutton_click-question.html)

Tommy Flynn

Userform - CommandButton_Click question
 
When I try to use the command below in a UserForm, I get locked in
PrintPreview and can't close it or the form. Is there a way around this?

Private Sub CommandButton1_Click()
Sheets(1).PrintPreview
End Sub



Dave Ramage[_2_]

Userform - CommandButton_Click question
 
Set the Userform's ShowModal property to False.

Cheers,
Dave
-----Original Message-----
When I try to use the command below in a UserForm, I get

locked in
PrintPreview and can't close it or the form. Is there a

way around this?

Private Sub CommandButton1_Click()
Sheets(1).PrintPreview
End Sub


.



All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com