ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to hide a workbook using VBA (https://www.excelbanter.com/excel-programming/320719-how-hide-workbook-using-vba.html)

Jeff

How to hide a workbook using VBA
 
I am trying to open a workbook, manipulate it, copy several sheets to another
workbook and then close the opened workbook.

I am using ".Workbooks(WrkBkRef).Visible = False" but nothing happens. The
variable "(WrkBkRef)." works fine for other operations so I know its not that

Any Ideas

Ben

How to hide a workbook using VBA
 
use
workbooks(wrkbkref).activate
ActiveWindow.Visible = False


"Jeff" wrote:

I am trying to open a workbook, manipulate it, copy several sheets to another
workbook and then close the opened workbook.

I am using ".Workbooks(WrkBkRef).Visible = False" but nothing happens. The
variable "(WrkBkRef)." works fine for other operations so I know its not that

Any Ideas


Harald Staff

How to hide a workbook using VBA
 
Read and consider your error messages. The error says "object doesn't
support this property or method" ? It's telling me that Visible is not an
option for a Workbook.

From there, search Help on Visible. It has an "applies to" list and you
whould find something useful there (hint: its "W" section).

HTH. Best wishes Harald

"Jeff" skrev i melding
...
I am trying to open a workbook, manipulate it, copy several sheets to

another
workbook and then close the opened workbook.

I am using ".Workbooks(WrkBkRef).Visible = False" but nothing happens.

The
variable "(WrkBkRef)." works fine for other operations so I know its not

that

Any Ideas





All times are GMT +1. The time now is 05:26 PM.

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