Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
i'm having problems hiding / displaying the excel application window. What i would like to do is have the application window hidden on open of the workbook and display a useform (can do) , unhide it when i need to show a report in print preview (can do) however i then need to hide it again (and display the userform) when they either print the report or close the print preview window - can't do. any ideas? also any general pros & cons about hiding the application window? Regards JulieD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I made a userform with two buttons (cancel and printpreview).
this seemed to work ok for me: Option Explicit Private Sub CommandButton1_Click() Application.Visible = True Unload Me End Sub Private Sub CommandButton2_Click() Me.Hide Application.Visible = True Worksheets("sheet1").PrintPreview Application.Visible = False Me.Show End Sub Private Sub UserForm_Initialize() Application.Visible = False End Sub Personal opinion only: I don't like hiding the excel application window. That just means that there's something else (usually unrelated) shown in the background. (I don't have many forms that should fill the whole screen, either.) JulieD wrote: Hi i'm having problems hiding / displaying the excel application window. What i would like to do is have the application window hidden on open of the workbook and display a useform (can do) , unhide it when i need to show a report in print preview (can do) however i then need to hide it again (and display the userform) when they either print the report or close the print preview window - can't do. any ideas? also any general pros & cons about hiding the application window? Regards JulieD -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Suggest also making it visible in the terminate event, just for proofing.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Dave Peterson" wrote in message ... I made a userform with two buttons (cancel and printpreview). this seemed to work ok for me: Option Explicit Private Sub CommandButton1_Click() Application.Visible = True Unload Me End Sub Private Sub CommandButton2_Click() Me.Hide Application.Visible = True Worksheets("sheet1").PrintPreview Application.Visible = False Me.Show End Sub Private Sub UserForm_Initialize() Application.Visible = False End Sub Personal opinion only: I don't like hiding the excel application window. That just means that there's something else (usually unrelated) shown in the background. (I don't have many forms that should fill the whole screen, either.) JulieD wrote: Hi i'm having problems hiding / displaying the excel application window. What i would like to do is have the application window hidden on open of the workbook and display a useform (can do) , unhide it when i need to show a report in print preview (can do) however i then need to hide it again (and display the userform) when they either print the report or close the preview window - can't do. any ideas? also any general pros & cons about hiding the application window? Regards JulieD -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I open a new window for each excel application? | New Users to Excel | |||
How to set Excel to open a new window for each application | Excel Discussion (Misc queries) | |||
Displaying MS Excel Chart control in ASP.NET Application | Charts and Charting in Excel | |||
How do I set up Excel to open a new instance/application window w. | Excel Discussion (Misc queries) | |||
Displaying Excel chart in C# application | Excel Programming |