ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a command to 'Hide' the Activeworkbook? (https://www.excelbanter.com/excel-programming/429143-there-command-hide-activeworkbook.html)

Tony Bender

Is there a command to 'Hide' the Activeworkbook?
 
My application consists of two workbooks; one is a menu with a user
form with numerous controls. These controls trigger the contents of,
and open the second workbook which includes the finished report. On
this report these is a button that enable the user to return to the
menu to make new selections. The code behind this is:

Sub ReOpenUF3()
Application.DisplayAlerts = False
ActiveWorkbook.Close
UF3.LB1.Visible = False
UF3.CB7.Visible = True
UF3.TB2.Visible = True
UF3.TB2.Value = Sheets("report").Range("XOProd")
UF3.Show
End Sub

The workbook containing the report is large and takes awhile to open.
Rather than closing and re-opening this workbook is there a command,
or code, to 'hide' the workbook when the user returns to the menu so
they don't have to wait for it to 'open'? I tried 'hide' and 'visible
= false' but neither work.

Thank you,

FSt1

Is there a command to 'Hide' the Activeworkbook?
 
hi
visible should have worked.
windows("Book2").visible = false
or
activewindow.visible = false

=true to unhide.

works in xp, on friday. (you know how mondays can be.)
regards
FSt1

"Tony Bender" wrote:

My application consists of two workbooks; one is a menu with a user
form with numerous controls. These controls trigger the contents of,
and open the second workbook which includes the finished report. On
this report these is a button that enable the user to return to the
menu to make new selections. The code behind this is:

Sub ReOpenUF3()
Application.DisplayAlerts = False
ActiveWorkbook.Close
UF3.LB1.Visible = False
UF3.CB7.Visible = True
UF3.TB2.Visible = True
UF3.TB2.Value = Sheets("report").Range("XOProd")
UF3.Show
End Sub

The workbook containing the report is large and takes awhile to open.
Rather than closing and re-opening this workbook is there a command,
or code, to 'hide' the workbook when the user returns to the menu so
they don't have to wait for it to 'open'? I tried 'hide' and 'visible
= false' but neither work.

Thank you,



All times are GMT +1. The time now is 12:19 AM.

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