Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide second copy of Excel

Status
Not open for further replies.

bdbBear

Programmer
Apr 29, 2005
54
US
Is there a way to hide a .xls file that is opened using Workbooks.Open?

After I open the .xls file from another .xls file it becomes visible; and I don't want it to be visble.

Thanks.
 
Hide its window, manually: Window>Hide, by code: Workbooks(Index or Name).Windows(1).Visible=False.
However, the user can still unhide the window. You can make an add-in, this will keep all worksheet data, it still can be converted to regular workbook, but this requires some code.

combo
 
Thanks, though this doesn't seem to work.

Workbooks.Open (datafile)
Workbooks(datafile).Windows(1).Visible = False

On the first line, the file opens.
But then I get a "subscript out of range" error message on the second line.

 
bdbBear,

If datafile includes a pathname, then your second line will generate the "Subscript out of range" error. You might try
Code:
ActiveWorkbook.Windows(1).Visible = False


Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top