OLE control for workbook hidden field

G

Greg Luce

In Excel under the Window menu there are hide and unhide menu options to
hide and unhide workbooks. However, the workbook object does not have a
visible or hide property. How, using OLE, can I view and change the hidden
status for workbooks?

Greg
 
D

Dave Peterson

In VBA, I'd use something like:

Dim myWindow As Window
Dim wkbk As Workbook

Set wkbk = Workbooks("someworkbooknamehere.xls")

For Each myWindow In wkbk.Windows
myWindow.Visible = False
Next myWindow
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top